473,387 Members | 1,512 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,387 software developers and data experts.

Pystone benchmark: Win vs. Linux (again)

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
Jul 18 '05 #1
6 2620
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.

Jul 18 '05 #2
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>

Jul 18 '05 #3
Franco Fiorese <fr************@tin.it> 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.
Jul 18 '05 #4
Paul Rubin <http://ph****@NOSPAM.invalid> wrote:
Franco Fiorese <fr************@tin.it> 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
Jul 18 '05 #5
al*****@yahoo.com (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.
Jul 18 '05 #6
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.).

Jul 18 '05 #7

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

Similar topics

16
by: Duncan Lissett | last post by:
Is there a Python implementation of Martin Richards benchmark Bench? Be interesting to add it to these www.lissett.com/ben/exp/bench1.htm
15
by: Duncan Lissett | last post by:
I'd appreciate any suggestions on how to make faster Python implementations of Richards benchmark. Perhaps there are obvious problems that can be corrected? http://www.lissett.com/ben/bench1.htm
13
by: Lucas Hofman | last post by:
Hi, Just installed Python 2.4 on a machine (RH8.0 Linux) that also has python 2.3 and python 2.2 installed. The latter came with the linux distribution, the other are compiled from source...
0
by: julio | last post by:
Hello Guys, AlphaServer EV6 processor 500mhz/1Gm memory with Linux mysql> SELECT BENCHMARK(1000000,ENCODE("hello","goodbye")); +----------------------------------------------+ |...
0
by: Jan Pieter Kunst | last post by:
I recently ran the MySQL benchmark suite on a Dual 1 GHz G4 running Mac OS X Server 10.2.8, and an 800 MHz Intel machine running SuSE Linux 8.0. Both installations used the same my.cnf file. The...
5
by: SARS | last post by:
Here's all the OSS Benchmarks run so far -- so far no Windos challengers... http://home.earthlink.net/~jabailo/OSS%20Benchmark.pdf The source is here: ...
3
by: Steve | last post by:
Hi, I'm currently looking a porting our Windows Codewarrior based C++ projects to MinGW and/or Visual Studio and I'm just wondering if there is a 'standard' suite of benchmark programs I can...
2
by: Matthijs van Waveren | last post by:
"Your opportunity to be a RECOGNIZED EXPERT in the HPC Community" The SPEC High Performance Group is seeking candidates for a benchmark suite based on Message Passing Interface (MPI)...
37
by: Jack | last post by:
I know one benchmark doesn't mean much but it's still disappointing to see Python as one of the slowest languages in the test: ...
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: 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...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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.