performance critical Python features

2011-06-23 Thread Eric Snow
I was thinking about the different features of Python that have an impact on performance. Here are the obvious ones I could think of: Features most impactful on performance: - function calls - loops Features least impactful on performance: - imports - function definitions - class definitions

Re: performance critical Python features

2011-06-23 Thread Chris Angelico
On Fri, Jun 24, 2011 at 2:58 AM, Eric Snow ericsnowcurren...@gmail.com wrote: So, which are the other pieces of Python that really need the heavy optimization and which are those that don't?  Thanks. Things that are executed once (imports, class/func definitions) and things that primarily wait

Re: performance critical Python features

2011-06-23 Thread Steven D'Aprano
On Fri, 24 Jun 2011 04:00:17 +1000, Chris Angelico wrote: On Fri, Jun 24, 2011 at 2:58 AM, Eric Snow ericsnowcurren...@gmail.com wrote: So, which are the other pieces of Python that really need the heavy optimization and which are those that don't?  Thanks. Things that are executed once

Re: performance critical Python features

2011-06-23 Thread Chris Angelico
On Fri, Jun 24, 2011 at 10:07 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Fri, 24 Jun 2011 04:00:17 +1000, Chris Angelico wrote: On Fri, Jun 24, 2011 at 2:58 AM, Eric Snow ericsnowcurren...@gmail.com wrote: So, which are the other pieces of Python that really need the