Thread: List Sorting Question

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Aug 2010
    Posts
    6

    List Sorting Question

    I have a program that relies on a sorted list of data structures. During program execution the list is initially sorted using list::sort however I continually need to add new unsorted data structures into the list. I initially just used the list:ush_back function to append all of the additional data structures to the end of the list and then run sort on the entire list. My question is would it be faster to make a smaller list containing the new data structures, sort it, and then merge it into the larger list. This adding new data and sorting is by far the slowest part of my program and I am looking for ways to speed it up. Any suggestions would be greatly appreciated
    Last edited by Polystyrene; 08-27-2010 at 02:05 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. linked list question
    By mikeman in forum C Programming
    Replies: 1
    Last Post: 11-30-2008, 01:56 PM
  2. List Question
    By ConsulVortex in forum C++ Programming
    Replies: 3
    Last Post: 01-14-2006, 04:38 AM
  3. Linked List Help
    By CJ7Mudrover in forum C Programming
    Replies: 9
    Last Post: 03-10-2004, 10:33 PM
  4. compiler build error
    By KristTlove in forum C++ Programming
    Replies: 2
    Last Post: 11-30-2003, 10:16 AM

Tags for this Thread