February 29, 2004 Overriding Array's .sort | ||||
---|---|---|---|---|
| ||||
Is is possible to override the sorting method used in an array's .sort? Peeking at the DMD sources leads me to believe it's using a QuickSort, which is fine and dandy. But if I know I'm working with an an array of uints, I could make it a lot faster on the average by swapping in a RadixSort instead. Yes, I'm aware I can do this externally, but being able to override it would mean the faster RadixSort would be used even in code I didn't write. Just some musings. Owen |
Copyright © 1999-2021 by the D Language Foundation