forked from ewmailing/hash-table-shootout
-
Notifications
You must be signed in to change notification settings - Fork 0
/
charts_51.html
121 lines (95 loc) · 5.77 KB
/
charts_51.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 = {"randomstring-runtime": [{"data": [[2000000, 1.297133], [4000000, 2.616034], [6000000, 4.125507], [8000000, 5.137504], [10000000, 7.056761], [12000000, 8.163], [14000000, 9.303464], [16000000, 10.821177], [18000000, 14.343838], [20000000, 15.433904], [22000000, 16.523737], [24000000, 17.27433], [26000000, 18.738282], [28000000, 19.808987], [30000000, 20.529194], [32000000, 21.163466], [34000000, 22.177021], [36000000, 23.347844]], "label": "Apple clang version 3.1 (tags/Apple/clang-318.0.58) (based on LLVM 3.1svn) std::tr1::unordered_map"}, {"data": [[2000000, 3.318949], [4000000, 6.512116], [6000000, 11.491969], [8000000, 13.746093], [10000000, 16.18076], [12000000, 24.660503], [14000000, 27.011691], [16000000, 31.743811], [18000000, 34.363985], [20000000, 37.273463], [22000000, 40.515917], [24000000, 57.260948], [26000000, 59.962821], [28000000, 62.615166], [30000000, 66.240825], [32000000, 64.799495], [34000000, 66.875422], [36000000, 70.272335]], "label": "Python 2.7.1 (C API) dict"}, {"data": [[2000000, 6.975252], [4000000, 22.387391], [6000000, 42.954709], [8000000, 66.977926], [10000000, 90.65829], [12000000, 120.643063], [14000000, 164.715236], [16000000, 190.826741], [18000000, 225.741733], [20000000, 263.579685], [22000000, 297.797966], [24000000, 346.363767], [26000000, 403.689921], [28000000, 432.998517], [30000000, 463.703066], [32000000, 439.139399], [34000000, 477.973987]], "label": "Ruby 1.8.7 (2011-12-28 patchlevel 357) [universal-darwin11.0] (C API) Hash"}, {"data": [[2000000, 3.518864], [4000000, 7.33736], [6000000, 12.769777], [8000000, 15.340047], [10000000, 24.909848], [12000000, 27.379393], [14000000, 30.058191], [16000000, 35.195969], [18000000, 55.240051], [20000000, 57.915708], [22000000, 60.419628], [24000000, 63.133294], [26000000, 66.116814], [28000000, 69.075254], [30000000, 72.048047], [32000000, 75.166751], [34000000, 854.505671], [36000000, 110.497058]], "label": "Lua 5.1.4 (C API) table (via LuaHashMap)"}]}
$(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>