Thank you developers for 2.3

D

David Lees

Flawless install and it ran my very simple minded (try not to laugh)
nested loop integer arithmetic benchmark twice as fast as 2.2.3
version 2.3 5.04 sec
version 2.2.3 9.77 sec

import time

def speedTest(N):
t1 = time.time()
k = 0
for i in xrange(N):
for j in xrange(N):
k += (i+j)

t2 = time.time()
return t2-t1

print speedTest(3000)

david lees
 
T

Tino Lange

Flawless install and it ran my very simple minded (try not to laugh)
nested loop integer arithmetic benchmark twice as fast as 2.2.3
version 2.3 5.04 sec
version 2.2.3 9.77 sec


Hi!

By the way: What was/is the speed with 2.1.x on the same system?

Cheers,

Tino
 
R

Raymond Hettinger

"David Lees"
Flawless install and it ran my very simple minded (try not to laugh)
nested loop integer arithmetic benchmark twice as fast as 2.2.3
version 2.3 5.04 sec
version 2.2.3 9.77 sec

import time

def speedTest(N):
t1 = time.time()
k = 0
for i in xrange(N):
for j in xrange(N):
k += (i+j)

t2 = time.time()
return t2-t1

print speedTest(3000)

david lees

You must really trust us.
The benchmark compares the speed
but doesn't check to see if the answers are the same ;-)


Raymond Hettinger
 
N

Nicola Mingotti

...
By the way: What was/is the speed with 2.1.x on the same system?

On 2.1.3 speedTest doesn't work . It gives OverflowError: integer
addition . It 's because in that version integer aren't converted
into Long Int when necessary .

....
t1 = time.time()
k = 0L
....
for j in xrange(n):
for i in xrange(n):
k += i + j
t1 = time.time()
return t1 - t0
 
C

Cousin Stanley

| You must really trust us.
| The benchmark compares the speed
| but doesn't check to see if the answers are the same

Python 2.2.1 Python 2.3b1

k ..... 26991000000 k ..... 26991000000

et .... 108.370000005 et .... 51.4100000858

Answers look OK and 2x speed improvement
seems to prevail for slower processors as well ....

Using Win98 @ 250 MHz ....
 
A

Aahz

Flawless install and it ran my very simple minded (try not to laugh)
nested loop integer arithmetic benchmark twice as fast as 2.2.3
version 2.3 5.04 sec
version 2.2.3 9.77 sec

import time

def speedTest(N):
t1 = time.time()
k = 0
for i in xrange(N):
for j in xrange(N):
k += (i+j)

t2 = time.time()
return t2-t1

print speedTest(3000)

That primarily tests the speed of the warnings module. Test starting
with 0L instead.
 
D

David Lees

Added initialization to a long and printout of both time and result.
Looks like faith was justified, but good point Raymond.

David Lees
------------
import time

def speedTest(N):
t1 = time.time()
k = 0L
for i in xrange(N):
for j in xrange(N):
k += (i+j)

t2 = time.time()
return t2-t1,k

print speedTest(3000)[/QUOTE]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top