Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re: Sorting data that don't fit in memory

by dws (Chancellor)
on Jan 24, 2001 at 13:45 UTC ( #53922=note: print w/replies, xml ) Need Help??

in reply to Sorting data that don't fit in memory

Here's a pointer.

If you can't fit the data into virtual memory, you're going to have to make a multi-pass sort, with intermediate results stored on disk. One algorithm you might consider is the "Radix" sort, which is a multipass, order preserving sort that is well-suited for very data sets with fixed-sized keys, and has O(n) behavior.

See Knuth, Vol. 1, Sorting and Searching for a complete description. As you read Knuth, consider how you'd use disk files for the intermediate partitions.

  • Comment on Re: Sorting data that don't fit in memory

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://53922]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2020-10-24 06:58 GMT
Find Nodes?
    Voting Booth?
    My favourite web site is:

    Results (242 votes). Check out past polls.