$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
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
=:->