Thread: BIG Sorting Problem!

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Dec 2012
    Posts
    45
    Quote Originally Posted by Adak View Post
    [...]

    A database.

    Well, ah - that would be NO. I intend to work everything in RAM as much as possible, so that's mmap function sounds like a winner. Thanks, I'll read up on it.

    Right now I'm writing up some multi-key comparison code in Quicksort.

    Thanks for your reply.
    Then mmap() won't help, unless you want to use a raw binary file in your computer as a big cache of the database.

    mmap() would be the way to go if the data were in a huge binary file instead of a database.

    Since you have a database, the ideal would be to read/write large blocks of data and work on them. If there is some transparent way to do this buffering, use it.

    Since you are using quicksort, you might want to have two buffers (or sliding windows): one for the lower extreme and one for the upper extreme.

    One stupid question: Can't your database sort the data for you?

  2. #2
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    Quote Originally Posted by comocomocomo View Post
    Then mmap() won't help, unless you want to use a raw binary file in your computer as a big cache of the database.

    mmap() would be the way to go if the data were in a huge binary file instead of a database.

    Since you have a database, the ideal would be to read/write large blocks of data and work on them. If there is some transparent way to do this buffering, use it.

    Since you are using quicksort, you might want to have two buffers (or sliding windows): one for the lower extreme and one for the upper extreme.

    One stupid question: Can't your database sort the data for you?
    The "database" is what was inferred - but it's output FROM a database - which isn't the same thing. The actual raw data format, has not been shared with me yet. (and I doubt it will be, since I'm a very unofficial helper type).

    As I understand it, the project won't be going forward without showing the ability to sort the data, and obtain useful info from the work. Whether this is a commercial enterprise or simply an educational project to see if it's feasible, is up in the air.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem with sorting
    By preeengles in forum C Programming
    Replies: 35
    Last Post: 04-22-2009, 07:45 PM
  2. problem with sorting
    By pinkpenguin in forum C Programming
    Replies: 2
    Last Post: 11-18-2005, 11:06 AM
  3. Help! Sorting Problem
    By zz3 in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2004, 02:48 AM
  4. Sorting problem
    By stimpyzu in forum C++ Programming
    Replies: 4
    Last Post: 11-21-2002, 01:07 AM
  5. Can anyone help with sorting problem???
    By DanTheMan in forum C Programming
    Replies: 1
    Last Post: 04-04-2002, 08:58 AM