A Study of Erlang ETS Table Implementations and Performance
Or: Judy Arrays Are Amazing Data Structures
Scott Lystig Fritchie
<slfritchie@snookles.com>
Snookles Music Consulting
A Study of Erlang ETS Table Implementations and Performance – p.1/19
A Study of Erlang ETS Table Implementations and Performance Or: - - PowerPoint PPT Presentation
A Study of Erlang ETS Table Implementations and Performance Or: Judy Arrays Are Amazing Data Structures Scott Lystig Fritchie <slfritchie@snookles.com> Snookles Music Consulting A Study of Erlang ETS Table Implementations and Performance
Scott Lystig Fritchie
<slfritchie@snookles.com>
Snookles Music Consulting
A Study of Erlang ETS Table Implementations and Performance – p.1/19
A Study of Erlang ETS Table Implementations and Performance – p.2/19
A Study of Erlang ETS Table Implementations and Performance – p.3/19
A Study of Erlang ETS Table Implementations and Performance – p.4/19
A Study of Erlang ETS Table Implementations and Performance – p.5/19
A Study of Erlang ETS Table Implementations and Performance – p.6/19
*ABCDEFGHIJKLMNOPQRSTUVWXYZ
*ABC . . . Z *ABC . . . QRST . . . Z *ABC . . . JKL . . . Z *ABCDEFGHIJ . . . Z
A Study of Erlang ETS Table Implementations and Performance – p.7/19
*ABCDEFGHIJKLMNOPQRSTUVWXYZ
*ABC . . . Z *ABC . . . QRST . . . Z *ABC . . . JKL . . . Z *ABCDEFGHIJ . . . Z
A Study of Erlang ETS Table Implementations and Performance – p.7/19
*ABCDEFGHIJKLMNOPQRSTUVWXYZ
*ABC . . . Z *ABC . . . QRST . . . Z *ABC . . . JKL . . . Z *ABCDEFGHIJ . . . Z
A Study of Erlang ETS Table Implementations and Performance – p.7/19
*ABCDEFGHIJKLMNOPQRSTUVWXYZ
*ABC . . . Z *ABC . . . QRST . . . Z *ABC . . . JKL . . . Z *ABCDEFGHIJ . . . Z
A Study of Erlang ETS Table Implementations and Performance – p.7/19
*ABCDEFGHIJKLMNOPQRSTUVWXYZ
*ABC . . . Z *ABC . . . QRST . . . Z *ABC . . . JKL . . . Z *ABCDEFGHIJ . . . Z
A Study of Erlang ETS Table Implementations and Performance – p.7/19
A Study of Erlang ETS Table Implementations and Performance – p.8/19
A Study of Erlang ETS Table Implementations and Performance – p.9/19
116
element 0 = atom #A element 1 element 2 element 3 {scott, "scott", <<"To">>, <<"scott">>}
Atom Table number name
foo scott bar A − 1 A A + 1 115 99 111 116
Example tuple
data = 84,111,58,115,99,111,116,116 Ref−counted binary: refcount = 2 size = 8
T : t c t
Binary: start = 3 length = 5 val start = 0 length = 2 val
s c
t
Tuple, size = 4:
A Study of Erlang ETS Table Implementations and Performance – p.10/19
NOTE: JudySL and JudyESL preserve lexigraphic sort
A Study of Erlang ETS Table Implementations and Performance – p.11/19
A Study of Erlang ETS Table Implementations and Performance – p.12/19
A Study of Erlang ETS Table Implementations and Performance – p.13/19
0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 102 103 104 105 106 107 108 Time relative to ’set’ type Number of keys set judyeh
judysl judyesl btree
A Study of Erlang ETS Table Implementations and Performance – p.14/19
0.05 0.1 0.15 0.2 0.25 106 107 108 Seconds per thousand keys Number of keys set judyeh
judysl judyesl btree
A Study of Erlang ETS Table Implementations and Performance – p.15/19
0.5 1 1.5 2 2.5 3 102 103 104 105 106 107 108 Time relative to ’set’ type Number of keys set judyeh
judysl judyesl btree
A Study of Erlang ETS Table Implementations and Performance – p.16/19
0.5 1 1.5 2 2.5 3 102 103 104 105 106 107 108 Time relative to ’set’ type Number of keys set judyeh
judysl judyesl
A Study of Erlang ETS Table Implementations and Performance – p.17/19
Table type Memory used Memory used Difference by 70K keys by 21M keys from set
A Study of Erlang ETS Table Implementations and Performance – p.18/19
A Study of Erlang ETS Table Implementations and Performance – p.19/19