Arrays vs tuples / lists

Shawn Pearce spearce@REDACTED
Tue May 18 02:09:16 CEST 2004

Ulf Wiger <ulf.wiger@REDACTED> wrote:
> 5> test:tup(1000,big).
> {609000,ok}

> 8> test:ets(1000,big).
> {138594000,ok}

Whoa!  I'll take that big tuple read-only any day.  :)

Of course, the tuple is only good if:

- only one process needs access to it (as otherwise it'll be cloned
  in every single process, unless you use single heap?)
- its read only

Man, I never thought that the difference would be that big though.
Learn something new every day.


More information about the erlang-questions mailing list