[erlang-questions] rbdict - A dictionary as a Red-Black tree
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)).
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions