[IronPython] Yield Prolog Benchmarks
Seo Sanghyeon
sanxiyn at gmail.com
Tue Oct 7 20:49:31 CEST 2008
2008/10/7 Dino Viehland <dinov at microsoft.com>:
> I took a look and we're spending most of our time doing old instance/old class accesses. If they used new-style classes it would probably run faster - although CPython might as well :) It seems like a good chunk of that is coming from __eq__/__cmp__ on the old-style classes - and w/ new-style classes we can make that really fast.
Thank you for this insight. Here are numbers with new-style classes.
(Just edit Variable.py to let IUnifiable inherit from object.)
Python 27.3299986451 27.3397389892 27.3310241944
IronPython 33.4816662453 33.4575162486 33.4634488462
So... yes, with new-style classes IronPython gets faster than CPython
with old-style classes, but CPython runs faster with new-style classes
as well. Just as you predicted. :)
Since this is clearly beneficial, I mailed the author a patch to make
old-style->new-style change.
--
Seo Sanghyeon
More information about the Ironpython-users
mailing list