7 ("c++-map" => 'GNU \textsf{libstdc++} \textsf{std::map}',
8 "c++-uomap" => 'GNU \textsf{libstdc++} \textsf{std::unordered\_map}',
9 "golang" => 'Golang \textsf{map}',
10 "libavl-avl" => 'GNU \textsf{libavl} plain AVL trees',
11 "libavl-pavl" => 'GNU \textsf{libavl} AVL trees, parent pointers',
12 "libavl-rtavl" => 'GNU \textsf{libavl} AVL trees, right threaded',
13 "libavl-tavl" => 'GNU \textsf{libavl} AVL trees, threaded',
14 "libavl-rb" => 'GNU \textsf{libavl} plain red-black trees',
15 "libavl-prb" => 'GNU \textsf{libavl} red-black trees, parent pointers',
16 "libavl-rtrb" => 'GNU \textsf{libavl} red-black trees, right threaded',
17 "libavl-trb" => 'GNU \textsf{libavl} red-black trees, threaded',
18 "lisp-ccl" => 'Common Lisp (Clozure CL)',
19 "lisp-clisp" => 'Common Lisp (GNU CLisp)',
20 "lisp-cmucl" => 'Common Lisp (CMU CL)',
21 "lisp-ecl" => 'Common Lisp (ECL)',
22 "lisp-sbcl" => 'Common Lisp (SBCL)',
23 "mLib-sym" => 'mLib, \textsf{sym} hash table',
24 "perl" => 'Perl hash',
25 "python" => 'Python \textsf{dict}',
26 "qptrie-qp-fanf" => 'Four-bit QP-trie, recursive \textsf{Tnextl}',
27 "qptrie-qp-mdw" => 'Four-bit QP-trie, iterative \textsf{Tnextl}',
28 "qptrie-qp-list" => 'Four-bit QP-trie, linked list',
29 "qptrie-fn-fanf" => 'Five-bit QP-trie, recursive \textsf{Tnextl}',
30 "qptrie-fn-mdw" => 'Five-bit QP-trie, iterative \textsf{Tnextl}',
31 "qptrie-fn-list" => 'Five-bit QP-trie, linked list',
32 "rust-btree" => 'Rust \textsf{std::collections::BTreeMap}',
33 "rust-hash" => 'Rust \textsf{std::collections::HashMap}',
34 "sgt-tree234" => "Simon Tatham's 2-3-4 tree",
35 "xyla-avl" => 'Xyla AVL tree',
36 "xyla-rb" => 'Xyla red-black tree',
37 "xyla-splay" => 'Xyla splay tree',
38 "xyla-treap" => 'Xyla treap');
40 our @STAT = ("lower whisker",
49 my ($impl, $data, $stat) = m{ ^ (\S+)
50 ((?: \s+ [0-9.]+)*) \s* \;
51 ((?: \s+ [0-9.]+){6}) \s* $ }x
53 my @data = map { $_ + 0.0 } split ' ', $data;
54 my @stat = map { $_ + 0.0 } split ' ', $stat;
55 my ($wlo, undef, undef, undef, undef, $whi) = @stat;
56 my @out = grep { $_ < $wlo || $_ > $whi } @data;
57 push @X, [$impl, \@stat, \@out];
60 print "\\begin{axis}\n";
61 printf " [ytick = {%s},\n", join(", ", 1 .. @X);
62 print " yticklabels =\n";
63 for (my $i = 0; $i < @X; $i++) {
68 $i == @X - 1 ? "}]" : ",";
71 print " \\addplot+\n";
72 print " [boxplot prepared =\n";
73 my ($impl, $stat, $out) = $x->@*;
74 STAT: for (my $j = 0; $j < @STAT; $j++) {
75 next STAT unless defined $stat->[$j];
76 printf " %s%s = %.3f%s\n",
78 $STAT[$j], $stat->[$j],
79 $j == @STAT - 1 ? "}]" : ",";
81 printf " coordinates {%s};\n",
82 join(" ", map { sprintf "(0, %.3f)", $_ } $out->@*);
84 print "\\end{axis}\n";