[erlang-questions] rbdict - A dictionary as a Red-Black tree
Jacob Perkins
japerk@REDACTED
Mon Jun 16 18:11:38 CEST 2008
I ran the following code thru fprof using N=1000 for Mod=dict and
Mod=rbdict. The basic results were that rbdict was ~10-20ms slower than dict
for both store and fetch.
store(Mod, N) ->
Fold = fun(I, D) -> Mod:store(I, I, D) end,
lists:foldl(Fold, Mod:new(), lists:seq(1, N)).
fetch(Mod, N, Dict) ->
Map = fun(I) -> Mod:fetch(I, Dict) end,
lists:map(Map, lists:seq(1, N)).
Jacob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080616/c43a1422/attachment.htm>
More information about the erlang-questions
mailing list