Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #8313 > unrolled thread

performance critical Python features

Started byEric Snow <ericsnowcurrently@gmail.com>
First post2011-06-23 10:58 -0600
Last post2011-06-23 10:58 -0600
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  performance critical Python features Eric Snow <ericsnowcurrently@gmail.com> - 2011-06-23 10:58 -0600

#8313 — performance critical Python features

FromEric Snow <ericsnowcurrently@gmail.com>
Date2011-06-23 10:58 -0600
Subjectperformance critical Python features
Message-ID<mailman.330.1308848288.1164.python-list@python.org>
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

A key point is that CPython has special-case optimization for
functions (code objects, locals, and eval) and loops (comprehensions,
generators, and iterators).  Also, other libraries are optimized via
C-extensions to be efficient, I expect due to their use in loops.  In
contrast to that, the machinery behind language features like imports
are moving to pure Python.

So, which are the other pieces of Python that really need the heavy
optimization and which are those that don't?  Thanks.

-eric

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web