Boost logo

Boost Users :

From: John Meinel (boost_at_[hidden])
Date: 2004-09-17 12:41:04


Howard wrote:

>
> On Sep 15, 2004, at 5:28 PM, Russell Mok wrote:
>
>> I know this is kinda off topic.
>>
>> I am trying to sort some objects which are expensive to copy. Does
>> anyone know a sort implementation that uses neither copier nor
>> assignment? The STLport version I have is using both. Worse, some
>> routines are passing arguments as T instead of const T &. I did
>> search boost and google but I couldn't find what I want.
>
>
> The Metrowerks implementation of std::sort uses swap (unqualified)
> exclusively.
>
> -Howard
>
>

Another idea which I think works out for simplicity is to just sort an
array of pointers, and then once all items are in order, you change the
ordering on disk.

I think this would be your biggest performance gains, as most sorting
has a lot of intermediate steps. You can do all those fast with the
pointers, and then do the slow sort of the files.

John
=:->


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net