[erlang-questions] Benchmarking Erlang: Deathmatch of gb_trees, dict, ets, mnesia ... and registered names
Ulf Wiger (TN/EAB)
ulf.wiger@REDACTED
Thu Oct 9 14:05:54 CEST 2008
Joel Reymont skrev:
> lookup(N) ->
> P = global:whereis_name(N),
> true = is_process_alive(P),
> lookup(N - 1).
>
> This should be enough for error checking, right?
>
> (1@REDACTED)4> c(map7).
> {ok,map7}
> (1@REDACTED)5> map7:test(100000).
> Populate: 265.2531
> Lookup: 0.0831
> ok
>
> The timings are not much off!
How many nodes did you have there?
> I thought I'd test with 4 nodes...
>
> (1@REDACTED)2> nodes().
> ['2@REDACTED','3@REDACTED','4@REDACTED']
> (1@REDACTED)3> map7:test(100000).
> Populate: 165.2079
> Lookup: 0.0641
> ok
>
> Not much of a difference, still super-efficient!
It seems as if you have quite a large variation on
the populate benchmark - esp if the first test above
is with only one node.
Anyway, the worst part of global's algorithm is the
random backoff at lock conflicts, but that shouldn't
affect you in this particular case.
BR,
Ulf W
More information about the erlang-questions
mailing list