Differences between revisions 9 and 10
Revision 9 as of 2008-12-11 08:19:46
Size: 1422
Editor: astound-69-42-4-166
Comment:
Revision 10 as of 2008-12-11 08:20:19
Size: 1440
Editor: astound-69-42-4-166
Comment:
Deletions are marked like this. Additions are marked like this.
Line 36: Line 36:
Adds a length hint to various objects, mainly for smarter allocation in map() and list() Adds a length hint to various objects, mainly for smarter allocation during map and list. See test_iterlen

Performance Enhancements Resources

Jython benchmarks (from PyPy's suite): http://freya.cs.uiuc.edu/~njriley/benchmark.html

Benchmark plots (currently broken): http://freya.cs.uiuc.edu/~njriley/plots.html

Ideas

jbaker & thobe's JavaOne '08 talk: Jython Implementing Dynamic Language Features For The Java Ecosystem

Allocation/GC Expense

Our algorithms are not always the problem, sometimes it's memory {de}allocations that slow you down

  • dicts/stringmap

PyStringMap/PyDictionary pay a penalty on allocation now that they're backed by ConcurrentHashMap. We could probably tweak the ConcurrentHashMap initialCapacity, concurrentLevel to reduce this cost

  • Frames

Frames are allocated for every Python method call, which is a GC expense. CPython (and JRuby?) recycle frame objects. Reducing the number of fields on the frame can also help (but this likely isn't possible)

Advanced Compiler

Rewrite select/socket module in Java

iterlen support

Adds a length hint to various objects, mainly for smarter allocation during map and list. See test_iterlen

PerformanceEnhancements (last edited 2009-01-26 05:40:07 by c-98-212-140-18)