Author nedds
Recipients collinwinter, nedds
Date 2008-06-23.17:25:37
SpamBayes Score 0.00264546
Marked as misclassified No
Message-id <1214241944.19.0.631532213789.issue3182@psf.upfronthosting.co.za>
In-reply-to
Content
This is a small patch to the 2to3 tool, replacing some calls to
isinstance (x,y) with type(x) is y in the file pytree.py. Although there
is only a slight performance increase for each time this change is made,
the recursive nature of pattern matching means that isinstance was being
calling hundreds of thousands of times per file, so overall these minor
changes result in a 3-4% speed increase in my limited testing. It
currently fails only one test due to line 432 in test_pytree, because I
had to rename the type parameter to new_type so I could call type() on
something. But with the line in the test file changed, it passes all tests.
History
Date User Action Args
2008-06-23 17:25:44neddssetspambayes_score: 0.00264546 -> 0.00264546
recipients: + nedds, collinwinter
2008-06-23 17:25:44neddssetspambayes_score: 0.00264546 -> 0.00264546
messageid: <1214241944.19.0.631532213789.issue3182@psf.upfronthosting.co.za>
2008-06-23 17:25:43neddslinkissue3182 messages
2008-06-23 17:25:42neddscreate