DescriptionThis adds two opcodes that the compiler uses when it sees an ast with foo.bar(...). Instead of compiling down to LOAD_ATTR and CALL_FUNCTION, it uses LOAD_METHOD and CALL_METHOD, which try to avoid bound method allocations.
Micro results from my MacBook:
[reid@bitsaw benchmarks]$ ./perf.py -b calls ../../unladen-trunk/python.exe
Report on Darwin bitsaw 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386 i386
Total CPU cores: 2
### call_method ###
Min: 0.583511 -> 0.344393: 1.6943x faster
Avg: 0.605230 -> 0.372738: 1.6237x faster
Significant (t=43.267534)
Stddev: 0.05956 -> 0.02799: 2.1276x smaller
Timeline: http://tinyurl.com/2655aog
### call_method_slots ###
Min: 0.542620 -> 0.342289: 1.5853x faster
Avg: 0.555865 -> 0.353226: 1.5737x faster
Significant (t=94.850070)
Stddev: 0.01514 -> 0.02134: 1.4089x larger
Timeline: http://tinyurl.com/2expp9p
### call_method_unknown ###
Min: 0.659792 -> 0.450914: 1.4632x faster
Avg: 0.666534 -> 0.456468: 1.4602x faster
Significant (t=79.788969)
Stddev: 0.02340 -> 0.02219: 1.0545x smaller
Timeline: http://tinyurl.com/2ebx4jz
### call_simple ###
Min: 0.343156 -> 0.344714: 1.0045x slower
Avg: 0.346054 -> 0.351503: 1.0157x slower
Significant (t=-4.340172)
Stddev: 0.01042 -> 0.01131: 1.0853x larger
Timeline: http://tinyurl.com/29888o9
Macro results from my MacBook:
[reid@bitsaw benchmarks]$ ./perf.py -b default ../../unladen-trunk/python.exe ../../unladen-swallow/python.exe
Report on Darwin bitsaw 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386 i386
Total CPU cores: 2
### 2to3 ###
23.578751 -> 22.740652: 1.0369x faster
### django ###
Min: 0.694497 -> 0.680717: 1.0202x faster
Avg: 0.696787 -> 0.682056: 1.0216x faster
Significant (t=47.982199)
Stddev: 0.00207 -> 0.00064: 3.2371x smaller
Timeline: http://tinyurl.com/2dn7b57
### nbody ###
Min: 0.263677 -> 0.263671: 1.0000x faster
Avg: 0.269985 -> 0.269915: 1.0003x faster
Not significant
Stddev: 0.03479 -> 0.03463: 1.0045x smaller
Timeline: http://tinyurl.com/24bdsdt
### slowpickle ###
Min: 0.494245 -> 0.466987: 1.0584x faster
Avg: 0.523489 -> 0.496445: 1.0545x faster
Not significant
Stddev: 0.10970 -> 0.11131: 1.0148x larger
Timeline: http://tinyurl.com/25lamlj
### slowspitfire ###
Min: 0.638928 -> 0.640723: 1.0028x slower
Avg: 0.645053 -> 0.642255: 1.0044x faster
Significant (t=7.250180)
Stddev: 0.00265 -> 0.00064: 4.1290x smaller
Timeline: http://tinyurl.com/25brxnx
### slowunpickle ###
Min: 0.240180 -> 0.242001: 1.0076x slower
Avg: 0.256118 -> 0.258107: 1.0078x slower
Not significant
Stddev: 0.05250 -> 0.05317: 1.0129x larger
Timeline: http://tinyurl.com/2euyyaa
### spambayes ###
Min: 0.268789 -> 0.259132: 1.0373x faster
Avg: 0.365989 -> 0.355499: 1.0295x faster
Not significant
Stddev: 0.30451 -> 0.30113: 1.0112x smaller
Timeline: http://tinyurl.com/23y7f8x
Patch Set 1 #Patch Set 2 : lots of work #Patch Set 3 : Update past opcode refactoring. #Patch Set 4 : Small cleanups #Patch Set 5 : Merge w/ trunk, fix test_profile #
MessagesTotal messages: 3
|