Serhiy Storchaka <storch...@gmail.com> added the comment: It would be better if you provide a working script that demonstrates the issue. I have completed your example (attached).
I ran the example on Python 3.1 and received: 0.249999046326 9.8737308979 0.587980985641 Then I ran on Python 3.3: 0.2100839614868164 0.8649246692657471 0.6062228679656982 As you can see, the new implementation is much faster. Benefit from caching decreased. I suppose, if we implement caching in C the difference will be more. Then I increased the size of the cycles in 10 times, and the time is almost equal (on Python 3): 1.8386573791503906 8.418540477752686 8.355770826339722 That I can't to explain. The time of cached version increased disproportionately, more than in 10 times. ---------- nosy: +storchaka Added file: http://bugs.python.org/file25099/CachingDecimal_example.py _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue14478> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com