== Quote from Lutger ([email protected])'s article
>
> Some time ago I reinvented these wheels for study purpose. A custom stack was 
> a little faster but not
that much. std.swap can't be inlined because it uses ref params, that cost also 
a bit since it's called
> many times. Switching to another sort if a certain recursion depth is reached 
> helped, but mostly in
degenerate cases.
> I still have the thing somewhere, it is about twice as fast as builtin sort. 
> It's not a lot of work but I could
dig it up and provide some timings if you want.

The sort I wrote for Tango uses the same basic heuristics, thanks to
a ticket that either you or Stewart Gordon submitted long ago.  I've
been meaning to compare it against the sort routine in std.algorithm
to see whether the Phobos routine could benefit from any of the same
tweaks.

Reply via email to