Keeping a dynamic sorted range
bearophile via Digitalmars-d
digitalmars-d at puremagic.com
Fri Nov 7 07:54:19 PST 2014
Max Klyga:
> Ranges are not container. They are meant for traversing. If you
> want a sorted range - use an underlying container that
> preserves ordering (trees, heaps)
Let's asssume that the underlying container is a sorted built-in
dynamic array (that has more locality than a tree and allows very
fast binary searches, unlike a heap).
So what solution do you suggest? A pair of functions that work on
a sorted container of that type for Phobos?
Bye,
bearophile
More information about the Digitalmars-d
mailing list