473,385 Members | 1,782 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Python 2.3.3 : Win32 build vs Cygwin build performance ?

Hi,

Is it me, or does anyone else get significantly better pystone results under
Cygwin versus the standard Win32 build ?

CYGWIN 1.5.6 + python 2.3.3-1 :
$ time python /usr/lib/python2.3/hotshot/stones.py
Pystone(1.1) time for 50000 passes = 2.344
This machine benchmarks at 21331.1 pystones/second
850004 function calls in 4.371 CPU seconds

Ordered by: internal time, call count

ncalls tottime percall cumtime percall filename:lineno(function)
50000 1.351 0.000 2.917 0.000 pystone.py:133(Proc1)
50000 1.132 0.000 1.202 0.000 pystone.py:53(copy)
1 0.609 0.609 4.371 4.371 pystone.py:79(Proc0)
50000 0.239 0.000 0.239 0.000 pystone.py:208(Proc8)
150000 0.184 0.000 0.184 0.000 pystone.py:203(Proc7)
150000 0.157 0.000 0.157 0.000 pystone.py:221(Func1)
50000 0.147 0.000 0.200 0.000 pystone.py:229(Func2)
50000 0.104 0.000 0.153 0.000 pystone.py:160(Proc3)
50000 0.098 0.000 0.153 0.000 pystone.py:184(Proc6)
50000 0.090 0.000 0.090 0.000 pystone.py:149(Proc2)
50002 0.070 0.000 0.070 0.000 pystone.py:45(__init__)
50000 0.068 0.000 0.068 0.000 pystone.py:177(Proc5)
50000 0.067 0.000 0.067 0.000 pystone.py:170(Proc4)
50000 0.055 0.000 0.055 0.000 pystone.py:246(Func3)
1 0.000 0.000 4.371 4.371 pystone.py:67(pystones)
0 0.000 0.000 profile:0(profiler)
real 0m26.603s
user 0m25.765s
sys 0m0.280s

Win32 :
C:\Documents and Settings\nlehuen>python c:\Python23\Lib\hotshot\stones.py
Pystone(1.1) time for 50000 passes = 4.1542
This machine benchmarks at 12036 pystones/second
850004 function calls in 14.917 CPU seconds

Ordered by: internal time, call count

ncalls tottime percall cumtime percall filename:lineno(function)
1 3.772 3.772 14.917 14.917 pystone.py:79(Proc0)
50000 2.226 0.000 6.314 0.000 pystone.py:133(Proc1)
150000 1.166 0.000 1.166 0.000 pystone.py:221(Func1)
150000 1.123 0.000 1.123 0.000 pystone.py:203(Proc7)
50000 1.075 0.000 1.075 0.000 pystone.py:208(Proc8)
50000 0.939 0.000 1.410 0.000 pystone.py:53(copy)
50000 0.903 0.000 1.279 0.000 pystone.py:229(Func2)
50000 0.795 0.000 1.157 0.000 pystone.py:160(Proc3)
50000 0.776 0.000 1.137 0.000 pystone.py:184(Proc6)
50000 0.500 0.000 0.500 0.000 pystone.py:149(Proc2)
50002 0.472 0.000 0.472 0.000 pystone.py:45(__init__)
50000 0.416 0.000 0.416 0.000 pystone.py:170(Proc4)
50000 0.394 0.000 0.394 0.000 pystone.py:177(Proc5)
50000 0.361 0.000 0.361 0.000 pystone.py:246(Func3)
1 0.000 0.000 14.917 14.917 pystone.py:67(pystones)
0 0.000 0.000 profile:0(profiler)

(total real time elapsed > 30 seconds)
Jul 18 '05 #1
3 2735
I have reproduced this on another machine. I tried playing with the
optimizer options (-O, -OO) and the result is the same : on pystone, Cygwin
1.5.6-1 + Python 2.3.3-1 is nearly twice as better as the standard Python
2.3.3 distribution for Win32...

I have checked that both distribution are psyco-free. Does anyone have an
idea of what is going on there ? Better compilation optimisation settings ?
GCC 3.3.1 producing faster code than MSVC 6 (allright, I can imagine that,
but twice faster ???) ?

Regards
Nicolas

"Nicolas Lehuen" <ho*******@jetable.net> a écrit dans le message de news:
40***********************@news.easynet.fr...
Hi,

Is it me, or does anyone else get significantly better pystone results under Cygwin versus the standard Win32 build ?

CYGWIN 1.5.6 + python 2.3.3-1 :
$ time python /usr/lib/python2.3/hotshot/stones.py
Pystone(1.1) time for 50000 passes = 2.344
This machine benchmarks at 21331.1 pystones/second
850004 function calls in 4.371 CPU seconds

Ordered by: internal time, call count

ncalls tottime percall cumtime percall filename:lineno(function)
50000 1.351 0.000 2.917 0.000 pystone.py:133(Proc1)
50000 1.132 0.000 1.202 0.000 pystone.py:53(copy)
1 0.609 0.609 4.371 4.371 pystone.py:79(Proc0)
50000 0.239 0.000 0.239 0.000 pystone.py:208(Proc8)
150000 0.184 0.000 0.184 0.000 pystone.py:203(Proc7)
150000 0.157 0.000 0.157 0.000 pystone.py:221(Func1)
50000 0.147 0.000 0.200 0.000 pystone.py:229(Func2)
50000 0.104 0.000 0.153 0.000 pystone.py:160(Proc3)
50000 0.098 0.000 0.153 0.000 pystone.py:184(Proc6)
50000 0.090 0.000 0.090 0.000 pystone.py:149(Proc2)
50002 0.070 0.000 0.070 0.000 pystone.py:45(__init__)
50000 0.068 0.000 0.068 0.000 pystone.py:177(Proc5)
50000 0.067 0.000 0.067 0.000 pystone.py:170(Proc4)
50000 0.055 0.000 0.055 0.000 pystone.py:246(Func3)
1 0.000 0.000 4.371 4.371 pystone.py:67(pystones)
0 0.000 0.000 profile:0(profiler)
real 0m26.603s
user 0m25.765s
sys 0m0.280s

Win32 :
C:\Documents and Settings\nlehuen>python c:\Python23\Lib\hotshot\stones.py
Pystone(1.1) time for 50000 passes = 4.1542
This machine benchmarks at 12036 pystones/second
850004 function calls in 14.917 CPU seconds

Ordered by: internal time, call count

ncalls tottime percall cumtime percall filename:lineno(function)
1 3.772 3.772 14.917 14.917 pystone.py:79(Proc0)
50000 2.226 0.000 6.314 0.000 pystone.py:133(Proc1)
150000 1.166 0.000 1.166 0.000 pystone.py:221(Func1)
150000 1.123 0.000 1.123 0.000 pystone.py:203(Proc7)
50000 1.075 0.000 1.075 0.000 pystone.py:208(Proc8)
50000 0.939 0.000 1.410 0.000 pystone.py:53(copy)
50000 0.903 0.000 1.279 0.000 pystone.py:229(Func2)
50000 0.795 0.000 1.157 0.000 pystone.py:160(Proc3)
50000 0.776 0.000 1.137 0.000 pystone.py:184(Proc6)
50000 0.500 0.000 0.500 0.000 pystone.py:149(Proc2)
50002 0.472 0.000 0.472 0.000 pystone.py:45(__init__)
50000 0.416 0.000 0.416 0.000 pystone.py:170(Proc4)
50000 0.394 0.000 0.394 0.000 pystone.py:177(Proc5)
50000 0.361 0.000 0.361 0.000 pystone.py:246(Func3)
1 0.000 0.000 14.917 14.917 pystone.py:67(pystones)
0 0.000 0.000 profile:0(profiler)

(total real time elapsed > 30 seconds)

Jul 18 '05 #2
Nicolas Lehuen wrote:
I have reproduced this on another machine. I tried playing with the
optimizer options (-O, -OO) and the result is the same : on pystone, Cygwin
1.5.6-1 + Python 2.3.3-1 is nearly twice as better as the standard Python
2.3.3 distribution for Win32...

I have checked that both distribution are psyco-free. Does anyone have an
idea of what is going on there ? Better compilation optimisation settings ?
GCC 3.3.1 producing faster code than MSVC 6 (allright, I can imagine that,
but twice faster ???) ?

Regards
Nicolas


I get results opposite yours (though with an oddity in the CPU seconds
reported on the Win32 build -- see below).

I'm also using Cygwin 1.5.6-1 + 2.3.3-1 and the stock Python 2.3.3
distribution for Win32.

Here's my cygwin results:

$ time python /usr/lib/python2.3/hotshot/stones.py
Pystone(1.1) time for 50000 passes = 2.813
This machine benchmarks at 17774.6 pystones/second
850004 function calls in 5.825 CPU seconds

Ordered by: internal time, call count

ncalls tottime percall cumtime percall filename:lineno(function)
50000 2.148 0.000 2.207 0.000 pystone.py:184(Proc6)
50002 1.102 0.000 1.102 0.000 pystone.py:45(__init__)
1 0.662 0.662 5.825 5.825 pystone.py:79(Proc0)
50000 0.435 0.000 4.188 0.000 pystone.py:133(Proc1)
50000 0.340 0.000 0.340 0.000 pystone.py:208(Proc8)
150000 0.182 0.000 0.182 0.000 pystone.py:203(Proc7)
150000 0.181 0.000 0.181 0.000 pystone.py:221(Func1)
50000 0.170 0.000 0.226 0.000 pystone.py:229(Func2)
50000 0.163 0.000 1.265 0.000 pystone.py:53(copy)
50000 0.152 0.000 0.214 0.000 pystone.py:160(Proc3)
50000 0.103 0.000 0.103 0.000 pystone.py:149(Proc2)
50000 0.072 0.000 0.072 0.000 pystone.py:177(Proc5)
50000 0.059 0.000 0.059 0.000 pystone.py:246(Func3)
50000 0.056 0.000 0.056 0.000 pystone.py:170(Proc4)
1 0.000 0.000 5.825 5.825 pystone.py:67(pystones)
0 0.000 0.000 profile:0(profiler)

real 0m35.403s
user 0m34.827s
sys 0m0.233s
And my Win 32 results:

C:\Documents and Settings\pmagwene>python c:\Python23\Lib\hotshot\stones.py
Pystone(1.1) time for 50000 passes = 2.44903
This machine benchmarks at 20416.3 pystones/second
850004 function calls in 6559.446 CPU seconds

Ordered by: internal time, call count

ncalls tottime percall cumtime percall filename:lineno(function)
1 1689.491 1689.491 6559.412 6559.412 pystone.py:79(Proc0)
50000 987.212 0.020 2610.494 0.052 pystone.py:133(Proc1)
50000 775.010 0.016 775.010 0.016 pystone.py:208(Proc8)
50000 416.668 0.008 637.938 0.013 pystone.py:53(copy)
150000 409.522 0.003 409.522 0.003 pystone.py:221(Func1)
50000 406.804 0.008 535.380 0.011 pystone.py:229(Func2)
150000 396.484 0.003 396.484 0.003 pystone.py:203(Proc7)
50000 310.752 0.006 445.215 0.009 pystone.py:160(Proc3)
50000 290.596 0.006 410.274 0.008 pystone.py:184(Proc6)
50000 239.539 0.005 239.539 0.005 pystone.py:149(Proc2)
50002 221.310 0.004 221.310 0.004 pystone.py:45(__init__)
50000 150.247 0.003 150.247 0.003 pystone.py:170(Proc4)
50000 146.099 0.003 146.099 0.003 pystone.py:177(Proc5)
50000 119.678 0.002 119.678 0.002 pystone.py:246(Func3)
1 0.033 0.033 6559.446 6559.446 pystone.py:67(pystones)
0 0.000 0.000 profile:0(profiler)

The Pystone time and machine benchmark shows that my Win32 build is
faster, though I don't understand the CPU seconds readout -- the pystone
benchmark did not last 1.5 hrs!

Maybe it's something odd about my setup? -- dual Xeons (hyperthreading
enabled), 2.5 GB ram, WinXP...

--Paul
Jul 18 '05 #3
One of my test machine was a 2,4 Ghz P4 (without hyperthreading), the other
an Athlon XP 2500+, both with 512 Mb of RAM and running under Windows XP.

In fact if I directly launch the test\pystones.py script, I dot get
marginally better results using the Win32 build :

E:\Documents and Settings\Nico>python E:\Python23\Lib\test\pystone.py
Pystone(1.1) time for 50000 passes = 1.36434
This machine benchmarks at 36647.7 pystones/second

$ python /lib/python2.3/test/pystone.py
Pystone(1.1) time for 50000 passes = 1.492
This machine benchmarks at 33512.1 pystones/second

So there must be something weird in the hotshot scripts... The cygwin build
being slightly slower than the pure Win32 build is something that feels much
more sensible.

Regards,
Nicolas

"Paul M" <pm****@snet.net> a écrit dans le message de news:
bv***********@netnews.upenn.edu...
Nicolas Lehuen wrote:
I have reproduced this on another machine. I tried playing with the
optimizer options (-O, -OO) and the result is the same : on pystone, Cygwin 1.5.6-1 + Python 2.3.3-1 is nearly twice as better as the standard Python 2.3.3 distribution for Win32...

I have checked that both distribution are psyco-free. Does anyone have an idea of what is going on there ? Better compilation optimisation settings ? GCC 3.3.1 producing faster code than MSVC 6 (allright, I can imagine that, but twice faster ???) ?

Regards
Nicolas

I get results opposite yours (though with an oddity in the CPU seconds
reported on the Win32 build -- see below).

I'm also using Cygwin 1.5.6-1 + 2.3.3-1 and the stock Python 2.3.3
distribution for Win32.

Here's my cygwin results:

$ time python /usr/lib/python2.3/hotshot/stones.py
Pystone(1.1) time for 50000 passes = 2.813
This machine benchmarks at 17774.6 pystones/second
850004 function calls in 5.825 CPU seconds

Ordered by: internal time, call count

ncalls tottime percall cumtime percall filename:lineno(function)
50000 2.148 0.000 2.207 0.000 pystone.py:184(Proc6)
50002 1.102 0.000 1.102 0.000 pystone.py:45(__init__)
1 0.662 0.662 5.825 5.825 pystone.py:79(Proc0)
50000 0.435 0.000 4.188 0.000 pystone.py:133(Proc1)
50000 0.340 0.000 0.340 0.000 pystone.py:208(Proc8)
150000 0.182 0.000 0.182 0.000 pystone.py:203(Proc7)
150000 0.181 0.000 0.181 0.000 pystone.py:221(Func1)
50000 0.170 0.000 0.226 0.000 pystone.py:229(Func2)
50000 0.163 0.000 1.265 0.000 pystone.py:53(copy)
50000 0.152 0.000 0.214 0.000 pystone.py:160(Proc3)
50000 0.103 0.000 0.103 0.000 pystone.py:149(Proc2)
50000 0.072 0.000 0.072 0.000 pystone.py:177(Proc5)
50000 0.059 0.000 0.059 0.000 pystone.py:246(Func3)
50000 0.056 0.000 0.056 0.000 pystone.py:170(Proc4)
1 0.000 0.000 5.825 5.825 pystone.py:67(pystones)
0 0.000 0.000 profile:0(profiler)

real 0m35.403s
user 0m34.827s
sys 0m0.233s
And my Win 32 results:

C:\Documents and Settings\pmagwene>python

c:\Python23\Lib\hotshot\stones.py Pystone(1.1) time for 50000 passes = 2.44903
This machine benchmarks at 20416.3 pystones/second
850004 function calls in 6559.446 CPU seconds

Ordered by: internal time, call count

ncalls tottime percall cumtime percall filename:lineno(function)
1 1689.491 1689.491 6559.412 6559.412 pystone.py:79(Proc0)
50000 987.212 0.020 2610.494 0.052 pystone.py:133(Proc1)
50000 775.010 0.016 775.010 0.016 pystone.py:208(Proc8)
50000 416.668 0.008 637.938 0.013 pystone.py:53(copy)
150000 409.522 0.003 409.522 0.003 pystone.py:221(Func1)
50000 406.804 0.008 535.380 0.011 pystone.py:229(Func2)
150000 396.484 0.003 396.484 0.003 pystone.py:203(Proc7)
50000 310.752 0.006 445.215 0.009 pystone.py:160(Proc3)
50000 290.596 0.006 410.274 0.008 pystone.py:184(Proc6)
50000 239.539 0.005 239.539 0.005 pystone.py:149(Proc2)
50002 221.310 0.004 221.310 0.004 pystone.py:45(__init__)
50000 150.247 0.003 150.247 0.003 pystone.py:170(Proc4)
50000 146.099 0.003 146.099 0.003 pystone.py:177(Proc5)
50000 119.678 0.002 119.678 0.002 pystone.py:246(Func3)
1 0.033 0.033 6559.446 6559.446 pystone.py:67(pystones)
0 0.000 0.000 profile:0(profiler)

The Pystone time and machine benchmark shows that my Win32 build is
faster, though I don't understand the CPU seconds readout -- the pystone
benchmark did not last 1.5 hrs!

Maybe it's something odd about my setup? -- dual Xeons (hyperthreading
enabled), 2.5 GB ram, WinXP...

--Paul

Jul 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: David Isal | last post by:
hi all, i'm new to python and i'm trying to build a python extension on win98, written in c++, with cygwin. but i keep having the same error message, and i didnt't find much resources on the web...
0
by: Phil Schmidt | last post by:
I'm attempting to follow the instructions at http://sebsauvage.net/python/mingw.html, without luck. I have Python 2.3, MinGW 3.2.3, ans SWIG 1.3.19. I get an export error on "initexample" when...
4
by: Andreou Giannis | last post by:
Allthough it is possible to build modules in Python2.3.3 and distutils with cygwin, by running: setup.py build --compiler=cygwin (after i created the libpython23.a) running: setup.py install...
6
by: Steve Holden | last post by:
Does anyone know the workaround for this error, encountered when trying to build PIL 1.1.4 from source under cygwin (Python 2.3.3)? running build_ext building '_imaging' extension gcc...
1
by: Brian Beck | last post by:
As far as I can tell, both maintainers of the Windows builds of Python-LDAP haven't updated in about a year. This doesn't exactly make the builds ancient or obsolete, but it would be nice to start...
10
by: Simon John | last post by:
After quite a while of wxPython I'm getting back into PyQt, mainly due to the announcement by Trolltech that they will make a GPL version of Qt4 for Windows (and Phil-T said he will make a PyQt to...
2
by: Christopher Subich | last post by:
From the documentation, it looks like DParser-python will do what I need, but I'm having trouble getting it installed properly. I'm using a win32 environment, with official 2.4 Python binaries. ...
0
by: Kurt B. Kaiser | last post by:
Patch / Bug Summary ___________________ Patches : 349 open ( +7) / 3737 closed (+25) / 4086 total (+32) Bugs : 939 open (-12) / 6648 closed (+60) / 7587 total (+48) RFE : 249 open...
9
by: Larry Hale | last post by:
I've heard tell of a Python binding for libmagic (file(1) *nixy command; see http://darwinsys.com/file/). Generally, has anybody built this and worked with it under Windows? The only thing I've...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.