Arrays vs tuples / lists

Ulf Wiger (AL/EAB) ulf.wiger@REDACTED
Sun May 23 11:09:49 CEST 2004


If you were to benchmark a version that supports
multi-user access, e.g. through client-server
communication, then shared heap would matter
(given that there is significant payload in the
communication.)

In the case of multiple processes accessing the 
same object, ets has the edge only if the atomicity
provided by ets is enough. Otherwise, one has to 
serialize, e.g. using a server process.

Of course, the main advantages with ets are
convenience and scalability (even up to millions of
objects). One aspect on scalability is that gen_server
crash reports do not work very well with millions of
objects on the process heap (since it reports state
as part of the crash report.)

Regards,
Uffe

> -----Original Message-----
> From: owner-erlang-questions@REDACTED
> [mailto:owner-erlang-questions@REDACTED]On Behalf Of Einar Karttunen
> Sent: den 23 maj 2004 10:06
> To: Thomas Lindgren
> Cc: erlang-questions@REDACTED
> Subject: Re: Arrays vs tuples / lists
> 
> 
> On 22.05 10:02, Thomas Lindgren wrote:
> > On the other hand, the shared-heap implementation
> > could conceivably avoid copying. I haven't checked
> > whether it actually does so.
> 
> I did some quick benchmarking with the test module in
> this thread. It appears that shared heap does not 
> improve performance in this case. However hipe makes
> the tuple case much faster.
> 
> - Einar Karttunen
> 



More information about the erlang-questions mailing list