imho first use the native sort algorythm of your compiler. Usually this is rather good because the standard compiler benchmarks test it and the library programmers try hard. Then you can try so beat them ;) 8 million integers is about 32 million bytes and will stay within memory for machines with RAM >32MB (like 64MB). I think that the time will be rather short (seconds) on a Pentium class machine. (I am comparing to database join/sort and search engine indexer operation on Unix). Peter -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.