Constant Time ETS Ordered Set Get Largest-Keyed Member ?

Eric Newhuis enewhuis@REDACTED
Fri Oct 24 20:55:52 CEST 2003


O Great ETS Masters,

Is there a "constant time" ETS ordered set get largest-keyed member 
function, technique, or trick?

I want to retreive the last member of the ordered set, the one with the 
largest valued key, often enough to justify building a separate ETS 
index table.  My code would be simpler, however, of course, if I could 
avoid the extra ETS table.

In C++, with a heavy dose of the Standard C++ Library containers, I'd 
probably do this with the "reverse end" member of a map<>.

Sincerely,
Eric Newhuis





More information about the erlang-questions mailing list