2812
Comment:
|
3431
|
Deletions are marked like this. | Additions are marked like this. |
Line 19: | Line 19: |
FredrikLundh: Creating the class is easy, but integrating it into Python is harder (most code that handles e.g. 8-bit strings assume a PyString). For Py3K, it would be quite interesting to "instrument" a Python interpreter, mapping all PyString macros to functions, and gathering some kind of usage statistics. |
|
Line 35: | Line 37: |
FredrikLundh: I'd like to work on refactoring the string method implementations into a "polymorphic" (SRE-style) support library for quite some time. This would let us share source code between 8-bit and Unicode strings, and make it easier to reuse code also for future array/bytes types (etc). |
Sprint topics following the NeedForSpeed theme
You can add additional topics below. Please discuss the specific goals and possible approaches to these tasks!
CPython
- Evaluate the PEPs for optimizing global and attribute lookups
[http://www.python.org/dev/peps/pep-0266/ PEP 266], [http://www.python.org/dev/peps/pep-0267/ PEP 267], and [http://www.python.org/dev/peps/pep-0280/ PEP 280]
- Can floating point ops be sped-up by avoiding flag/exception checks at every step? Can some floating point ops be in-lined in ceval.c?
- Implement portions of the decimal module in C
- Build-out struct module to support fast, high-volume binary conversions -- perhaps with regexp analogs such struct.compile() and struct.finditer()
- Create a string subclass that provides lazy slicing without copying
FredrikLundh: Creating the class is easy, but integrating it into Python is harder (most code that handles e.g. 8-bit strings assume a PyString). For Py3K, it would be quite interesting to "instrument" a Python interpreter, mapping all PyString macros to functions, and gathering some kind of usage statistics.
- Allow selective removal of unused features such as profiling support
- Faster parsing of strings and bytes into int, long, etc.
- Buffer for use with network I/O
- Build-out the collections module for optimized data structures:
- ordered dictionary
- alternate list implementation optimized for fast insertion and deletion
- red/black tree
- pivot tables
- skip list
Create a 64 bit PyInt type (for 32 bit machines)
- Optimize methods in stringobject.c
FredrikLundh: I'd like to work on refactoring the string method implementations into a "polymorphic" (SRE-style) support library for quite some time. This would let us share source code between 8-bit and Unicode strings, and make it easier to reuse code also for future array/bytes types (etc).
- Add itertools.imerge() and itertools.izip_longest()
- Guido has a standing request to have threading.py written in C
- Revisit Armin's zombie frame idea for reducing function call overhead. IIRC, the unsolved problem was how to save partially constructed frames without impacting the performance of recursive functions.
- improve gzip's readline performance
Pure Python Projects
Improve [http://dada.perl.it/shootout/python.html language shootout] submissions
- Improve the API for timeit.py. Guido thinks that much of the intelligence in the command-line interface should be shifted to importable functions.
Update PythonSpeed/PerformanceTips
Twisted
- Speed improvements to select and poll reactors
- Reactor based on /dev/epoll
- Better integration with psyco
- Improvements against twisted benchmark
Psyco
- Support for generator expressions
- Support for nested scopes
- Support for more dictionary operations
- Speedup float arithmetic
- Support for more built-ins (e.g. int(), long(), float(), etc.)
- Upgrade for python 2.5
- Better tools for profiling psyco-ness of application
- Investigate usefulness of IVM (with aim to producing a more streamlined dispatch loop)
- LLVM backend
- Virtualized longs (for long longs)
Virtualized slots (Ability to cache getattribute() values)
Py3000
- Make a wishlist for possible performance gains in Py3.0