Re: How to use associative arrays in Ada 2005?



"Alex R. Mosteo" <devnull@xxxxxxxxxxxxxx> writes:

I don't think this is completely fair. Yes, hashes are said to be O(1) but
also they always carry the warning that this is not absolute. I'd feel
dishonest if presenting an algorithm saying it's O(1) if it uses hash maps.
I'd probably prefer to use trees and give O(log n) as a real upper bound.

Agree with all of the above. If you need an upper-bound guarantee, then an
ordered form (which is tree-based) is preferred.
.