Containers I'd like to see in std.containers

bearophile bearophileHUGS at lycos.com
Mon May 31 12:51:57 PDT 2010


Philippe Sigaud:
> > Yeah, particularly if having both stack and queue just costs one alias. I
> mean, it's a standard library. I know I can use built-in arrays (for
> example) as stacks and queues, but sometimes I just want to have a stack.

And in some situations it's better to have stacks and queues implemented with a deque (for example a dynamic array of pointers to short fixed-size arrays, where all arrays but the first and last one are full) instead of just a dynamic array.

Later some kind of cache-conscious B+-something tree can be useful ^_^ The implementation is not much harder than the Red-black trees, etc, but they can be better for small keys, because they use CPU cache lines better.

Bye,
bearophile


More information about the Digitalmars-d mailing list