This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author christian.heimes
Recipients christian.heimes, gvanrossum, jyasskin, nnorwitz
Date 2008-01-08.18:03:17
SpamBayes Score 0.032513015
Marked as misclassified No
Message-id <1199815400.31.0.803294723463.issue1762@psf.upfronthosting.co.za>
In-reply-to
Content
without abc:
$ time ./python Lib/test/regrtest.py test_decimal
real    0m10.113s
user    0m9.685s
sys     0m0.196s

with numbers.Real subclass:
$ time ./python Lib/test/regrtest.py  test_decimal
real    0m16.232s
user    0m15.241s
sys     0m0.384s

Proposed patch:
$ time ./python Lib/test/regrtest.py  test_decimal
real    0m11.128s
user    0m9.533s
sys     0m0.260s

Only with if instance.__class__ in cls._abc_cache: return True
$ time ./python Lib/test/regrtest.py  test_decimal
real    0m11.201s
user    0m10.345s
sys     0m0.292s

Wow, __instancecheck__ must be called a *lot* of times.
History
Date User Action Args
2008-01-08 18:03:20christian.heimessetspambayes_score: 0.032513 -> 0.032513015
recipients: + christian.heimes, gvanrossum, nnorwitz, jyasskin
2008-01-08 18:03:20christian.heimessetspambayes_score: 0.032513 -> 0.032513
messageid: <1199815400.31.0.803294723463.issue1762@psf.upfronthosting.co.za>
2008-01-08 18:03:18christian.heimeslinkissue1762 messages
2008-01-08 18:03:17christian.heimescreate