Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Pystone benchmark: Win vs. Linux (again)

Reply
Thread Tools

Pystone benchmark: Win vs. Linux (again)

 
 
Franco Fiorese
Guest
Posts: n/a
 
      01-28-2005
Hi all,
I am relatively new about Python benchmarks.
After some experiments I found that Python on my PC Windows XP has a
relevant higher performance than on Linux. The simple test using
pystone.py shows this:

* Windows XP Pro: 16566.7 pystones/second
* Linux (kernel 2.6.9 NPTL): 12346.2 pystones/second

I have repeated the test, on Linux, also with other distributions and
kernel but a relevant difference still exists with Windows offering a
better performance.

Is there any way, that you know, to get better performance under Linux?

regards
Franco
 
Reply With Quote
 
 
 
 
Simon John
Guest
Posts: n/a
 
      01-29-2005
Franco Fiorese wrote:

> Is there any way, that you know, to get better performance under

Linux?

Build Python yourself, using relevant CFLAGS and TARGET for your
processor?

I've always noticed that Windows Python takes a lot longer to startup
than Linux, but never really looked at runtime performance.

 
Reply With Quote
 
 
 
 
Fredrik Lundh
Guest
Posts: n/a
 
      01-29-2005
Franco Fiorese wrote:

> I am relatively new about Python benchmarks.
> After some experiments I found that Python on my PC Windows XP has a relevant higher performance
> than on Linux. The simple test using pystone.py shows this:
>
> * Windows XP Pro: 16566.7 pystones/second
> * Linux (kernel 2.6.9 NPTL): 12346.2 pystones/second


what Python version are you using for these tests? what Windows build?

</F>



 
Reply With Quote
 
Paul Rubin
Guest
Posts: n/a
 
      01-29-2005
Franco Fiorese <> writes:
> * Windows XP Pro: 16566.7 pystones/second
> * Linux (kernel 2.6.9 NPTL): 12346.2 pystones/second
>
> I have repeated the test, on Linux, also with other distributions and
> kernel but a relevant difference still exists with Windows offering a
> better performance.
>
> Is there any way, that you know, to get better performance under Linux?


I hate to say this but the Windows C compiler may be beating GCC in
output code. Doing anything about it may require a lot of careful
profiling and tuning.
 
Reply With Quote
 
Alex Martelli
Guest
Posts: n/a
 
      01-29-2005
Paul Rubin <http://> wrote:

> Franco Fiorese <> writes:
> > * Windows XP Pro: 16566.7 pystones/second
> > * Linux (kernel 2.6.9 NPTL): 12346.2 pystones/second
> >
> > I have repeated the test, on Linux, also with other distributions and
> > kernel but a relevant difference still exists with Windows offering a
> > better performance.
> >
> > Is there any way, that you know, to get better performance under Linux?

>
> I hate to say this but the Windows C compiler may be beating GCC in
> output code. Doing anything about it may require a lot of careful
> profiling and tuning.


....or (just as hypothetically) purchasing some commercial compiler might
help, under the assumption that the optimization and code generation of
the compiler are the issues here. I have nothing but hearsay to go on,
but IBM's compiler for PPC chips, and Intel's compiler for Intel chips,
appear to claim that they have excellent code generation, for example.


Alex
 
Reply With Quote
 
Paul Rubin
Guest
Posts: n/a
 
      01-29-2005
(Alex Martelli) writes:
> ...or (just as hypothetically) purchasing some commercial compiler might
> help, under the assumption that the optimization and code generation of
> the compiler are the issues here. I have nothing but hearsay to go on,
> but IBM's compiler for PPC chips, and Intel's compiler for Intel chips,
> appear to claim that they have excellent code generation, for example.


Perhaps so. Actually that benchmark difference may have come from
differing Python versions. I've heard that Intel cc typically beats
gcc by 5% or so for integer code. There are various benchmarks
floating around. But that Pystone measurement differed by
considerably more.
 
Reply With Quote
 
Franco Fiorese
Guest
Posts: n/a
 
      01-29-2005
Fredrik Lundh wrote:
> Franco Fiorese wrote:
>
>
>>I am relatively new about Python benchmarks.
>>After some experiments I found that Python on my PC Windows XP has a relevant higher performance
>>than on Linux. The simple test using pystone.py shows this:
>>
>> * Windows XP Pro: 16566.7 pystones/second
>> * Linux (kernel 2.6.9 NPTL): 12346.2 pystones/second

>
>
> what Python version are you using for these tests? what Windows build?
>
> </F>
>
>
>

I have performed the test under Linux Fedora Core 3 and Windows XP
Professional SP2.
This is the info about my system and Python (from /proc/cpuinfo):

processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 8
model name : Pentium III (Coppermine)
stepping : 10
cpu MHz : 896.418
cache size : 256 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 mtrr pge mca cmov
pat pse36 mmx fxsr sse
bogomips : 1769.47

System RAM: 256MB
-------------------------------------

Under Linux The python version is 2.3.4 (release 11) stock Fedora 3 RPM
(compiled from python-2.3.4-11.src.rpm)

Under Windows the Python version is 2.3.4
-------------------------------------

Anyway I will try to build the latest version (2.4) from source using
the best possible optmizations with the gcc compiler.

Being the pystone a benchmark that exercises mostly the compiler
optimizations I wonder if there is a benchmark that could bring up the
whole capabilities of the operating system (I/O, multithreading, memory
allocation, etc.).



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Understanding the Pystone measurement tleeuwenburg@gmail.com Python 2 03-27-2011 05:31 AM
Applet to run on Win 98, Win ME, Win XP, Win Vista & Win 7 ?? Krist Java 6 05-06-2010 11:53 PM
Re: Performance (pystone) of python 2.4 lower then python 2.3 ??? Andreas Kostyrka Python 0 12-17-2004 02:00 PM
Performance (pystone) of python 2.4 lower then python 2.3 ??? Lucas Hofman Python 13 12-16-2004 03:24 AM
pystone: pydotorg's RPM scores better than Fedora 2's RPM Zhi Min Python 0 06-11-2004 08:40 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57