> > Probably I found one reason comparation for classic style class is slower on > > Python2.5. > > Comparation function instance_compare() calls PyErr_GivenExceptionMatches(), > > and it was just flag operation on 2.4. But on 2.5, probably related to > > introduction of BaseException, > > it checks inherited type tuple. (ie: PyExceptionInstance_Check) > > I'm curious about the speed of 2.6 (trunk). I think this should have > become faster due to the introduction of fast subtype checks (he says > without looking at the code). > > n > Yes, I confirmed trunk is faster than 2.5. /////////////////////////////////////// // Code import timeit t = timeit.Timer(""" f1 < f2 """, """ class Foo: pass f1 = Foo() f2 = Foo() """) print t.timeit(10000) /////////////////////////////////////// // Result release-maint24 0.337sec release-maint25 0.625sec trunk 0.494sec ////////////////////////////////////// // Result of plex_test2.py release-maint24 2.944sec release-maint25 4.026sec trunk 3.625sec
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4