Thread overview
Performance O(??) for associative array lookup
August 14

Does D give any guarantees for performance order-something ? What’s the current lib implementation like?

Many thanks in advance.

August 14

On Wednesday, 14 August 2024 at 07:48:58 UTC, Cecil Ward wrote:

>

Does D give any guarantees for performance order-something ? What’s the current lib implementation like?

Many thanks in advance.

See the graphs in https://dplug.org/tutorials/Dplug%20Tutorials%2018%20-%20The%20Case%20Against%20Binary%20Trees.pdf

Multiple solutions for O(log(N)) insert, delete and look-up, with builtin hashmaps being pretty good.

August 17

On Wednesday, 14 August 2024 at 07:48:58 UTC, Cecil Ward wrote:

>

Does D give any guarantees for performance order-something ? What’s the current lib implementation like?

It is amortized O(1), like most hash implementations.

-Steve