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 | jyasskin |
|---|---|
| Recipients | christian.heimes, gvanrossum, jyasskin, nnorwitz, rhettinger |
| Date | 2008年02月17日.02:47:23 |
| SpamBayes Score | 0.05294157 |
| Marked as misclassified | No |
| Message-id | <1203216445.47.0.185991115449.issue1762@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
I'd like a second opinion about whether it's a good idea to commit the attached patch, which moves abc._Abstract into object. Its effect is to speed ./python.exe -m timeit -s 'import abc' -s 'class Foo(object): __metaclass__=abc.ABCMeta' 'Foo()' up from 2.5us to 0.201us. For comparison: $ ./python.exe -m timeit -s 'import abc' -s 'class Foo(object): pass' 'Foo()' 10000000 loops, best of 3: 0.203 usec per loop $ ./python.exe -m timeit -s 'import abc' -s 'class Foo(object):' -s ' def __new__(cls): return super(Foo, cls).__new__(cls)' 'Foo()' 1000000 loops, best of 3: 1.18 usec per loop $ ./python.exe -m timeit -s 'import abc' -s 'from decimal import Decimal' 'Decimal()' 100000 loops, best of 3: 9.51 usec per loop After this patch, the only slowdown I can find is an extra .5us in isinstance, so I think it'll be time to close this bug. |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2008年02月17日 02:47:25 | jyasskin | set | spambayes_score: 0.0529416 -> 0.05294157 recipients: + jyasskin, gvanrossum, nnorwitz, rhettinger, christian.heimes |
| 2008年02月17日 02:47:25 | jyasskin | set | spambayes_score: 0.0529416 -> 0.0529416 messageid: <1203216445.47.0.185991115449.issue1762@psf.upfronthosting.co.za> |
| 2008年02月17日 02:47:24 | jyasskin | link | issue1762 messages |
| 2008年02月17日 02:47:23 | jyasskin | create | |