Sort trouble
    Jarrett Billingsley 
    jarrett.billingsley at gmail.com
       
    Tue Apr  7 16:50:06 PDT 2009
    
    
  
On Tue, Apr 7, 2009 at 7:08 PM, bearophile <bearophileHUGS at lycos.com> wrote:
> Stewart Gordon:
>> > - It can be a template, so it can be faster (confirmed. I have a sort that is sometimes 3+ times faster).
>> What is there preventing a built-in sort being implemented in this way?
>
> Can you use templates with a statically compiled std lib?
The template would have to be in the "headers."  It wouldn't be
compiled into the library file itself.
The other problem with a templated sort is that while it's faster than
the current built-in sort, it also means there would be a different
template instantiation for every element type.  Not ideal.
    
    
More information about the Digitalmars-d-learn
mailing list