[erlang-questions] finding the nearest key in a key-value table
Jay Nelson
jay@REDACTED
Wed May 28 02:47:06 CEST 2014
Evgeny wrote:
> There's a library which could be used for this task with minor modifications
> https://github.com/brigadier/bisect/blob/master/src/bisect.erl
bisect allows only fixed length property names. Kresten did a variant that
allows variable length property names at https://github.com/krestenkrab/vbisect
The nice thing is that these put the dictionary in a single binary so it can be
easily passed around and read concurrently, which is especially efficient on
multicore machines because of the shared binary heap. Updates require producing a
new binary and distributing it, so they are geared more towards read-many
usage.
jay
More information about the erlang-questions
mailing list