473,795 Members | 2,922 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2649
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.i nvalid> 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.c om (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
4445
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
1882
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
2098
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 tarballs. Comparing them gives the following unexpected result: $ /usr/bin/python pystone.py Pystone(1.1) time for 50000 passes = 1.86
0
2085
by: julio | last post by:
Hello Guys, AlphaServer EV6 processor 500mhz/1Gm memory with Linux mysql> SELECT BENCHMARK(1000000,ENCODE("hello","goodbye")); +----------------------------------------------+ | BENCHMARK(1000000,ENCODE("hello","goodbye")) | +----------------------------------------------+ | 0 |
0
1834
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 results are comparable in all benchmarks except one: the 'insert'. In that one, the Mac is more than twice as slow. Below are the benchmark results for boch machines, and the my.cnf I used. I was wondering if there is something I can do,...
5
1474
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: http://home.earthlink.net/~jabailo/limit-cpu.c
3
3006
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 download and compile on the various environments that will give me an idea on the relative performance of each STL? For example - a test program that will run through, say, appending one character to a string 1000000 times, copying vectors,...
2
1674
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) applications. Successful submitters will be rewarded with a free license for the benchmark suite, recognized on the SPEC website and in media materials, and their programs will influence future designs of computer hardware and software. For example the...
37
2042
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: http://blog.dhananjaynene.com/2008/07/performance-comparison-c-java-python-ruby-jython-jruby-groovy/
0
9672
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9519
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10439
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10165
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10001
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9043
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6783
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5437
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2920
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.