[Python-bugs-list] [ python-Bugs-474992 ] python version benchmark
noreply@sourceforge.net
noreply@sourceforge.net
Sat, 27 Oct 2001 20:24:08 -0700
Bugs item #474992, was opened at 2001-10-25 11:43
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=474992&group_id=5470
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Frederic Giacometti (giacometti)
Assigned to: Nobody/Anonymous (nobody)
Summary: python version benchmark
Initial Comment:
This is not a bug per se, but following instructions by
Tim Peters the One :), I'm submitting here the
benchmark script.
I'm getting currently the following final output
(bench.txt):
version bench1 nogc bench2
1.5.2 0 %
2.0 48 % 33 % 21 %
2.1.1 53 % 35 % 25 %
2.2 51 % 35 % 23 %
where:
bench1 = original python 1.5.2 script
nogc = bench1 when disabling gc
bench2 = bench1 script 'rewritten' for python 2.0 and
latter (string methods, sre -> pre...)
These numbers are high...
Frederic Giacometti
----------------------------------------------------------------------
>Comment By: Tim Peters (tim_one)
Date: 2001-10-27 20:24
Message:
Logged In: YES
user_id=31435
Useful info from the effbot:
"""
fwiw, here's the timings I get on a slow windows box (using
PythonWare builds, and time.clock() instead of os.times()):
python 1.5: 2.01
python 2.0: 3.02
python 2.1: 3.00
python 2.2: 3.04
after playing some more, I ended up with this little
benchmark:
def dosomething(item):
return [None, None, None]
data = [None] * 100000
import time
t1 = time.clock();
x = map(dosomething, data)
t2 = time.clock()
print t2 - t1
python 1.5: 1.02 seconds
python 2.0: 1.95 seconds
python 2.1: 1.85 seconds
python 2.2: 1.90 seconds
"""
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=474992&group_id=5470