Why optimization mode is slower than normal mode?

L

Leo Jay

Hi all,

I'm using python 2.6 in a windows xp box, when I try pystone, I get:
C:\Python26\Lib\test>python pystone.py 500000
Pystone(1.1) time for 500000 passes = 5.93632
This machine benchmarks at 84227.3 pystones/second

C:\Python26\Lib\test>python -OO pystone.py 500000
Pystone(1.1) time for 500000 passes = 6.00515
This machine benchmarks at 83261.8 pystones/second

I tried many times, and get the same result.

Why optimization mode is slower than normal mode?
 
C

Cro

Not-optimised:
Pystone(1.1) time for 1000000 passes = 12.8366
This machine benchmarks at 77902 pystones/second

Optimised:
Pystone(1.1) time for 1000000 passes = 13.0574
This machine benchmarks at 76584.8 pystones/second

It is probably the way it should be. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top