[erlang-questions] Indexed element access: array vs. erlang:element

Joel Reymont <>
Mon Aug 25 18:56:04 CEST 2008


Also, this is the updated results table from the blog post [1].

     %% 10,000 elements

     11> arr:test().
     Fixed-size array: get:     3364mc, set:     6941mc
     Extensible array: get:        1mc, set:       23mc
     Tuple:            get:      625mc, set:   209628mc
     Tree:             get:    47700mc, set:     4305mc
     ok

     %% 100,000 elements

     4> arr:test(100000).
     Fixed-size array: get:    39017mc, set:    73636mc
     Extensible array: get:        2mc, set:       36mc
     Tuple:            get:     6290mc, set: 24495846mc
     Tree:             get:   619615mc, set:    52691mc
     ok

[1] http://www.wagerlabs.com/blog/2008/08/optimizing-erlang-a-death-match-of-arrays-vs-tuples.html#more

--
wagerlabs.com








More information about the erlang-questions mailing list