Thank you for the explanation, Ryan!
Uli
--
Domino Laser GmbH
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932
--
http://mail.python.org/mailman/listinfo/python-list
gry georgeryo...@gmail.com writes:
...
rest = ['%d' % randint(1, mx) for i in range(wd - 1)]
for i in range(i,i+rows): ...
One thing that immediately comes to mind is use xrange instead of range.
Also, instead of
first = ['%d' % i]
rest = ['%d' % randint(1, mx) for i in
gry wrote:
[python-2.4.3, rh CentOS release 5.5 linux, 24 xeon cpu's, 24GB ram]
I have a little data generator that I'd like to go faster... any
suggestions?
maxint is usually 9223372036854775808(max 64bit int), but could
occasionally be 99.
width is usually 500 or 1600, rows ~ 5000.
Peter Otten wrote:
gry wrote:
[python-2.4.3, rh CentOS release 5.5 linux, 24 xeon cpu's, 24GB ram]
I have a little data generator that I'd like to go faster... any
suggestions?
maxint is usually 9223372036854775808(max 64bit int), but could
occasionally be 99.
width is usually 500 or
[python-2.4.3, rh CentOS release 5.5 linux, 24 xeon cpu's, 24GB ram]
I have a little data generator that I'd like to go faster... any
suggestions?
maxint is usually 9223372036854775808(max 64bit int), but could
occasionally be 99.
width is usually 500 or 1600, rows ~ 5000.
from random import
On Mon, 13 Dec 2010 18:50:38 -0800, gry wrote:
[python-2.4.3, rh CentOS release 5.5 linux, 24 xeon cpu's, 24GB ram] I
have a little data generator that I'd like to go faster... any
suggestions?
maxint is usually 9223372036854775808(max 64bit int), but could
occasionally be 99.
width is
gry wrote:
I have a little data generator that I'd like to go faster... any
suggestions?
maxint is usually 9223372036854775808(max 64bit int), but could
occasionally be 99.
width is usually 500 or 1600, rows ~ 5000.
from random import randint
def row(i, wd, mx):
first = ['%d' % i]
Steven D'Aprano wrote:
Replacing while True with while 1 may save a tiny bit of overhead.
Whether it is significant or not is another thing.
Is this the price for an intentional complexity or just a well-known
optimizer deficiency?
Just curious...
Uli
--
Domino Laser GmbH
Geschäftsführer:
On Tue, 2010-12-14 at 08:08 +0100, Ulrich Eckhardt wrote:
Steven D'Aprano wrote:
Replacing while True with while 1 may save a tiny bit of overhead.
Whether it is significant or not is another thing.
Is this the price for an intentional complexity or just a well-known
optimizer deficiency?