Orders of magnitude

Christian Tismer tismer at stackless.com
Mon Mar 29 21:59:54 EST 2004


Simon Wittber wrote:

>>A list 10 million integers suck up ~160 megs of memory with Python.
> 
> 
> Sorting a list of 10000000 integers sounds like a job for Numeric.
> 
> The below code does the job in 22 seconds. Numeric consumes ~40MB for
> the initial array, then grabs another ~40MB, once the sorting starts.
> Its about as lean as you can get it.

Nice solution.
Although not as general.
I also don't see how you can get along with sorting integers?
We are handling lots of strings.
And as said in another place, sorting is theoretically
inefficient, if you are asking for clusters of equality.
Maybe you should provide some definition of "the job".

ciao - chris

p.s.; this is the last time I manually will remove a "nospam"
email entry. Who should remove all the spam mailings, if people
like you don't help with it? :-)

-- 
Christian Tismer             :^)   <mailto:tismer at stackless.com>
Mission Impossible 5oftware  :     Have a break! Take a ride on Python's
Johannes-Niemeyer-Weg 9a     :    *Starship* http://starship.python.net/
14109 Berlin                 :     PGP key -> http://wwwkeys.pgp.net/
work +49 30 89 09 53 34  home +49 30 802 86 56  mobile +49 173 24 18 776
PGP 0x57F3BF04       9064 F4E1 D754 C2FF 1619  305B C09C 5A3B 57F3 BF04
      whom do you want to sponsor today?   http://www.stackless.com/





More information about the Python-list mailing list