[erlang-questions] Why are arrays faster than tuples?
ryeguy
ryeguy1@REDACTED
Thu Mar 26 21:07:04 CET 2009
I was looking at the benchmark at
http://thinkerlang.com/2008/08/25/optimizing-erlang-a-death-match-of-arrays-and-tuples.html
and it looks like arrays are many many times faster than tuples. Why
is this? I understand that arrays are preallocated while tuples must
be resized, but I thought that in erlang all arguments are copied when
they are passed to a function? Am I mistaken or are there just some
exceptions as to what types of terms are [not] copied?
More information about the erlang-questions
mailing list