On Sun, 11 Nov 2007 08:51:37 -0800, Michael Bacarella wrote: >> As others have pointed out there is no way that this takes 45 >> minutes.Must be something with your system or setup. >> >> A functionally equivalent code for me runs in about 49 seconds! >> (it ends up using about twice as much ram as the data on disk) > > You can download the list of keys from here, it's 43M gzipped: > http://www.sendspace.com/file/9530i7 > > and see it take about 45 minutes with this: > > $ cat cache-keys.py > #!/usr/bin/python > v = {} > for line in open('keys.txt'): > v[long(line.strip())] = True
Takes about 40 seconds here. [EMAIL PROTECTED]:~$ time python test.py real 0m38.758s user 0m25.290s sys 0m1.580s Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list