H. S. Teoh:
On the other hand, AA.byKey() will return a *lazy* sequence of keys (i.e., it won't actually walk the AA unless you want it to), so doingthis ought to be O(1):auto mykey = myarray.byKey().front; myarray.remove(mykey);
In general the associative array table can have many empty slots, so byKey.front is not always O(1). But AAs were recently improved, now byKey.front is much faster.
Bye, bearophile