forked from ewmailing/hash-table-shootout
-
Notifications
You must be signed in to change notification settings - Fork 0
/
charts_10k.html
121 lines (95 loc) · 9.04 KB
/
charts_10k.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<html>
<head>
<!--[if IE]><script language="javascript" type="text/javascript" src="http://flot.googlecode.com/svn/trunk/excanvas.min.js"></script><![endif]-->
<script language="javascript" type="text/javascript" src="http://flot.googlecode.com/svn/trunk/jquery.js"></script>
<script language="javascript" type="text/javascript" src="http://flot.googlecode.com/svn/trunk/jquery.flot.js"></script>
</head>
<body>
<script>
series_settings = {
lines: { show: true },
points: { show: true }
};
grid_settings = { tickColor: '#ddd' };
xaxis_settings = {
tickSize: 5000000,
tickFormatter: function(num, obj) { return parseInt(num/1000000) + 'M'; }
};
yaxis_runtime_settings = {
tickSize: 10,
tickFormatter: function(num, obj) { return num + ' sec.'; }
};
yaxis_memory_settings = {
tickSize: 200*1024*1024,
tickFormatter: function(num, obj) { return parseInt(num/1024/1024) + 'MiB'; }
};
legend_settings = {
position: 'nw',
backgroundOpacity: 0
};
runtime_settings = {
series: series_settings,
grid: grid_settings,
xaxis: xaxis_settings,
yaxis: yaxis_runtime_settings,
legend: legend_settings
};
memory_settings = {
series: series_settings,
grid: grid_settings,
xaxis: xaxis_settings,
yaxis: yaxis_memory_settings,
legend: legend_settings
};
chart_data = {"delete-runtime": [{"data": [[10000000, 1.282303], [20000000, 2.548308], [30000000, 3.869917], [40000000, 5.181464]], "label": "Apple clang version 3.1 (tags/Apple/clang-318.0.58) (based on LLVM 3.1svn) std::tr1::unordered_map"}, {"data": [[10000000, 0.977731], [20000000, 1.995325], [30000000, 2.801925], [40000000, 3.938088]], "label": "Python 2.7.1 (C API) dict"}, {"data": [[10000000, 1.42981], [20000000, 2.977154], [30000000, 4.534918], [40000000, 6.006748]], "label": "Ruby 1.8.7 (2011-12-28 patchlevel 357) [universal-darwin11.0] (C API) Hash"}, {"data": [[10000000, 0.528219], [20000000, 1.053632], [30000000, 1.589808], [40000000, 2.118306]], "label": "Lua 5.1.4 (C API) table"}], "deletestring-runtime": [{"data": [[10000000, 4.249219], [20000000, 8.452978], [30000000, 13.13663]], "label": "Apple clang version 3.1 (tags/Apple/clang-318.0.58) (based on LLVM 3.1svn) std::tr1::unordered_map"}, {"data": [[10000000, 6.5976], [20000000, 13.332599], [30000000, 18.744522]], "label": "Python 2.7.1 (C API) dict"}, {"data": [[10000000, 21.551516], [20000000, 47.032877], [30000000, 57.854199]], "label": "Ruby 1.8.7 (2011-12-28 patchlevel 357) [universal-darwin11.0] (C API) Hash"}, {"data": [[10000000, 8.489204], [20000000, 17.910011], [30000000, 28.691586]], "label": "Lua 5.1.4 (C API) table"}], "randomstring-runtime": [{"data": [[10000000, 7.13154], [20000000, 14.724822], [30000000, 20.120997]], "label": "Apple clang version 3.1 (tags/Apple/clang-318.0.58) (based on LLVM 3.1svn) std::tr1::unordered_map"}, {"data": [[10000000, 16.385946], [20000000, 35.419022], [30000000, 62.635211]], "label": "Python 2.7.1 (C API) dict"}, {"data": [[10000000, 91.662722], [20000000, 243.114541], [30000000, 427.416799]], "label": "Ruby 1.8.7 (2011-12-28 patchlevel 357) [universal-darwin11.0] (C API) Hash"}, {"data": [[10000000, 24.987746], [20000000, 53.690365], [30000000, 67.166437]], "label": "Lua 5.1.4 (C API) table"}], "random-runtime": [{"data": [[10000000, 8.085534], [20000000, 17.042672], [30000000, 20.994236], [40000000, 35.874844]], "label": "Apple clang version 3.1 (tags/Apple/clang-318.0.58) (based on LLVM 3.1svn) std::tr1::unordered_map"}, {"data": [[10000000, 5.751857], [20000000, 12.442776], [30000000, 22.577123], [40000000, 27.037794]], "label": "Python 2.7.1 (C API) dict"}, {"data": [[10000000, 32.343524], [20000000, 89.407335], [30000000, 164.329418], [40000000, 223.89166]], "label": "Ruby 1.8.7 (2011-12-28 patchlevel 357) [universal-darwin11.0] (C API) Hash"}, {"data": [[10000000, 8.165989], [20000000, 17.614294], [30000000, 22.697637], [40000000, 37.970804]], "label": "Lua 5.1.4 (C API) table"}], "sequentialstring-runtime": [{"data": [[10000000, 6.728074], [20000000, 13.729599], [30000000, 19.06921]], "label": "Apple clang version 3.1 (tags/Apple/clang-318.0.58) (based on LLVM 3.1svn) std::tr1::unordered_map"}, {"data": [[10000000, 12.199289], [20000000, 25.532882], [30000000, 44.450847]], "label": "Python 2.7.1 (C API) dict"}, {"data": [[10000000, 65.90694], [20000000, 168.931676], [30000000, 294.071543]], "label": "Ruby 1.8.7 (2011-12-28 patchlevel 357) [universal-darwin11.0] (C API) Hash"}, {"data": [[10000000, 24.60861], [20000000, 53.807488], [30000000, 68.196616]], "label": "Lua 5.1.4 (C API) table"}], "sequentialstring-memory": [{"data": [[10000000, 3262693376], [20000000, 3898396672], [30000000, 4386017280]], "label": "Apple clang version 3.1 (tags/Apple/clang-318.0.58) (based on LLVM 3.1svn) std::tr1::unordered_map"}, {"data": [[10000000, 4349865984], [20000000, 5805559808], [30000000, 8067268608]], "label": "Python 2.7.1 (C API) dict"}, {"data": [[10000000, 3755802624], [20000000, 4902326272], [30000000, 6452371456]], "label": "Ruby 1.8.7 (2011-12-28 patchlevel 357) [universal-darwin11.0] (C API) Hash"}, {"data": [[10000000, 3952984064], [20000000, 5408456704], [30000000, 6058573824]], "label": "Lua 5.1.4 (C API) table"}], "sequential-runtime": [{"data": [[10000000, 1.847716], [20000000, 3.724039], [30000000, 4.795031], [40000000, 7.505389]], "label": "Apple clang version 3.1 (tags/Apple/clang-318.0.58) (based on LLVM 3.1svn) std::tr1::unordered_map"}, {"data": [[10000000, 1.898522], [20000000, 3.791905], [30000000, 6.808367], [40000000, 7.568057]], "label": "Python 2.7.1 (C API) dict"}, {"data": [[10000000, 4.396645], [20000000, 10.612319], [30000000, 18.040082], [40000000, 24.686423]], "label": "Ruby 1.8.7 (2011-12-28 patchlevel 357) [universal-darwin11.0] (C API) Hash"}, {"data": [[10000000, 0.846183], [20000000, 1.690064], [30000000, 2.215994], [40000000, 3.363016]], "label": "Lua 5.1.4 (C API) table"}], "sequential-memory": [{"data": [[10000000, 3100164096], [20000000, 3573338112], [30000000, 3898396672], [40000000, 4524232704]], "label": "Apple clang version 3.1 (tags/Apple/clang-318.0.58) (based on LLVM 3.1svn) std::tr1::unordered_map"}, {"data": [[10000000, 3343237120], [20000000, 3992313856], [30000000, 5043003392], [40000000, 5289418752]], "label": "Python 2.7.1 (C API) dict"}, {"data": [[10000000, 2853183488], [20000000, 3211816960], [30000000, 3603988480], [40000000, 3929079808]], "label": "Ruby 1.8.7 (2011-12-28 patchlevel 357) [universal-darwin11.0] (C API) Hash"}, {"data": [[10000000, 2761945088], [20000000, 3030380544], [30000000, 3030380544], [40000000, 3567251456]], "label": "Lua 5.1.4 (C API) table"}]}
$(function () {
$.plot($("#sequential-runtime"), chart_data['sequential-runtime'], runtime_settings);
$.plot($("#random-runtime"), chart_data['random-runtime'], runtime_settings);
$.plot($("#delete-runtime"), chart_data['delete-runtime'], runtime_settings);
$.plot($("#sequential-memory"), chart_data['sequential-memory'], memory_settings);
$.plot($("#sequentialstring-runtime"), chart_data['sequentialstring-runtime'], runtime_settings);
$.plot($("#randomstring-runtime"), chart_data['randomstring-runtime'], runtime_settings);
$.plot($("#deletestring-runtime"), chart_data['deletestring-runtime'], runtime_settings);
$.plot($("#sequentialstring-memory"), chart_data['sequentialstring-memory'], memory_settings);
});
</script>
<style>
body, * { font-family: sans-serif; }
div.chart {
width: 700px;
height: 230px;
}
div.xaxis-title {
width: 700px;
text-align: center;
font-style: italic;
font-size: small;
color: #666;
}
</style>
<h3>Sequential Inserts: Execution Time (integers)</h3>
<div class="chart" id="sequential-runtime"></div>
<div class="xaxis-title">number of entries in hash table</div>
<h3>Sequential Inserts: Execution Time (strings)</h3>
<div class="chart" id="sequentialstring-runtime"></div>
<div class="xaxis-title">number of entries in hash table</div>
<h3>Random Inserts: Execution Time (integers)</h3>
<div class="chart" id="random-runtime"></div>
<div class="xaxis-title">number of entries in hash table</div>
<h3>Random Inserts: Execution Time (strings)</h3>
<div class="chart" id="randomstring-runtime"></div>
<div class="xaxis-title">number of entries in hash table</div>
<h3>Deletes: Execution Time (integers)</h3>
<div class="chart" id="delete-runtime"></div>
<div class="xaxis-title">number of entries in hash table</div>
<h3>Deletes: Execution Time (strings)</h3>
<div class="chart" id="deletestring-runtime"></div>
<div class="xaxis-title">number of entries in hash table</div>
<h3>Memory Usage (integers)</h3>
<div class="chart" id="sequential-memory"></div>
<div class="xaxis-title">number of entries in hash table</div>
<h3>Memory Usage (strings)</h3>
<div class="chart" id="sequentialstring-memory"></div>
<div class="xaxis-title">number of entries in hash table</div>
</body>
</html>