[Python-3000] Performance Notes (original) (raw)
Nicholas Bastin nick.bastin at gmail.com
Mon Sep 3 20:54:45 CEST 2007
- Previous message: [Python-3000] [mark at qtrac.eu: Poss. clarification for What's New in Python 3]
- Next message: [Python-3000] Performance Notes
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I've been doing some profiling of 3.0 vs. 2.6 release builds on Windows XP for the purpose of hopefully closing the performance gap. This data is very preliminary, but I thought I'd throw it out here in case someone else also wanted to look into this. Also, possibly useful for comparing against profiling data on other platforms. The table below just lists functions and speed differentials in 3.0 vs. 2.6, ordered by the functions in which we spend the most total time.
NOTE: This data is time sampling, not call graph. Added time could come from either more calls, or longer calls.
- 11.5% PyEval_EvalFrameEx
- 40.2% lookdict (replacing lookdict_string) +312.9% PyDict_GetItem
- 13.2% call_function
- 19.4% fast_function
Other notes:
- PyLong_FitsInLong consumes about 2% of total pystone runtime.
- unicode_compare consumes the exact same time in 3.0 that string_richcompare consumed in 2.6. Either these functions share a similar CPU profile, or their call counts vary dramatically.
Top 5 functions in Python 2.6:
- PyEval_EvalFrameEx (48.66%)
- lookdict_string (5.76%)
- call_function (4.80%)
- frame_dealloc (2.80%)
- fast_function (2.48%)
Top 5 functions in Python 3.0:
- PyEval_EvalFrameEx (44.37%)
- lookdict (6.66%)
- PyDict_GetItem (4.63%)
- unicode_hash (3.51%)
- call_function (3.38%)
-- Nick
- Previous message: [Python-3000] [mark at qtrac.eu: Poss. clarification for What's New in Python 3]
- Next message: [Python-3000] Performance Notes
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]