[Python-Dev] SIGCHECK() in longobject.c
dickinsm at gmail.com
Mon Oct 19 11:28:34 CEST 2009
On Sun, Oct 18, 2009 at 11:46 PM, Antoine Pitrou <solipsis at pitrou.net> wrote:
> Sure, but it's no different than doing, e.g.:
> (don't try this, it just made by computer slow down to a crawl and I had to kill
> -9 the Python interpreter)
Maybe you were running out of RAM? On a 64-bit machine,
list(range(10**8)) takes over 3 Gb.
For me, x = list(range(10**8)) takes around 6 seconds, and then
x.sort() takes around 2 seconds. This is on a machine with
16 Gb of RAM. (Though I do seem to recall that timsort is
extra fast for already sorted lists: O(n) rather than O(n log n)?)
So I'd say that it *is* different. A million digit integer takes less
than half a megabyte of RAM, so a single operation can be
horribly slow long before memory limitations are reached.
I'd prefer to keep the SIGCHECK unless there's a really
compelling advantage to getting rid of it.
More information about the Python-Dev