How to sort very large arrays?

Terry Reedy tjreedy at udel.edu
Fri Jun 13 18:29:42 EDT 2008


"kj" <socyl at 987jk.com.invalid> wrote in message 
news:g2uc8o$pjk$1 at reader2.panix.com...
| I'm downloading some very large tables from a remote site.  I want
| to sort these tables in a particular way before saving them to
| disk.  In the past I found that the most efficient way to do this
| was to piggy-back on Unix's highly optimized sort command.  So,

If the tables can fit in memory as a list of key,text tuples and if they 
have some of the non-random structure exploited by Python's current 
list.sort (only documented, as far as I know, either in the source or test 
code, not sure), then you might consider that.  Otherwise, use the system 
sort.






More information about the Python-list mailing list