[erlang-questions] ets vs list
Mon Sep 13 16:29:21 CEST 2010
On 09/13/2010 02:58 PM, Max Lapshin wrote:
> 2) what ets is for, if list is fast enough on inserts?
The main unique feature of ets is that data residing in
ets is not garbage-collected.
Roughly speaking, the cost of GC is proportional to the
amount of live data, so if you have very large data sets,
process heap-based data will have an increasing hidden
cost in GC sweep/copy time, even though access times may
look excellent in benchmarks.
Running benchmarks for longer periods should allow you
to include amortized GC cost in the results, but you
will also get a bunch of other noise. Tracing on GC
events with timestamps may be a more accurate method.
More information about the erlang-questions