Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #8313 > unrolled thread
| Started by | Eric Snow <ericsnowcurrently@gmail.com> |
|---|---|
| First post | 2011-06-23 10:58 -0600 |
| Last post | 2011-06-23 10:58 -0600 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
performance critical Python features Eric Snow <ericsnowcurrently@gmail.com> - 2011-06-23 10:58 -0600
| From | Eric Snow <ericsnowcurrently@gmail.com> |
|---|---|
| Date | 2011-06-23 10:58 -0600 |
| Subject | performance 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
Back to top | Article view | comp.lang.python
csiph-web