sorting 1172026 entries

Devin Jeanpierre jeanpierreda at gmail.com
Sun May 6 12:21:45 EDT 2012


On Sun, May 6, 2012 at 12:11 PM, J. Mwebaze <jmwebaze at gmail.com> wrote:
> [ (datatime, int) ] * 1172026

I can't duplicate slowness. It finishes fairly quickly here. Maybe you
could try posting specific code? It might be something else that is
making your program take forever.

>>> x = [(datetime.datetime.now() + datetime.timedelta(random.getrandbits(10)), random.getrandbits(32)) for _ in xrange(1172026)]
>>> random.shuffle(x)
>>> x.sort()
>>>

-- Devin



More information about the Python-list mailing list