forked from ewmailing/hash-table-shootout
-
Notifications
You must be signed in to change notification settings - Fork 0
/
charts_strlen_get_LuaInternalization.html
88 lines (71 loc) · 4.15 KB
/
charts_strlen_get_LuaInternalization.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
<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 = {"randomstringgetgoodinternalized-runtime": [{"data": [[2000000, 1.569966], [6000000, 5.582725], [10000000, 9.952242], [14000000, 15.089086], [18000000, 19.146345], [22000000, 24.315581], [26000000, 29.739468], [30000000, 35.44568]], "label": "Lua 5.2.1 (C API) table (via LuaHashMap)"}, {"data": [[2000000, 1.25644], [6000000, 4.374747], [10000000, 7.81201], [14000000, 11.870152], [18000000, 15.095881], [22000000, 19.272572], [26000000, 23.621033], [30000000, 28.201579]], "label": "Lua 5.2.1 (C API) table (via LuaHashMap) with internalization optimization"}, {"data": [[2000000, 1.272487], [6000000, 4.42021], [10000000, 7.888506], [14000000, 12.048424], [18000000, 15.279903], [22000000, 19.464359], [26000000, 23.872074], [30000000, 28.460156]], "label": "Lua 5.2.1 (C API) table (via LuaHashMap) with internalization and length"}], "randomstringgetgoodinternalized-memory": [{"data": [[2000000, 2849988608], [6000000, 3684253696], [10000000, 4586283008], [14000000, 5101674496], [18000000, 6420889600], [22000000, 6934544384], [26000000, 7515299840], [30000000, 7978426368]], "label": "Lua 5.2.1 (C API) table (via LuaHashMap)"}, {"data": [[2000000, 2849988608], [6000000, 3684253696], [10000000, 4653522944], [14000000, 5101150208], [18000000, 6420889600], [22000000, 6934806528], [26000000, 7448715264], [30000000, 7961387008]], "label": "Lua 5.2.1 (C API) table (via LuaHashMap) with internalization optimization"}, {"data": [[2000000, 2849988608], [6000000, 3684253696], [10000000, 4653260800], [14000000, 5101674496], [18000000, 6420365312], [22000000, 6934544384], [26000000, 7448715264], [30000000, 7977902080]], "label": "Lua 5.2.1 (C API) table (via LuaHashMap) with internalization and length"}]}
$(function () {
$.plot($("#randomstringgetgoodinternalized-runtime"), chart_data['randomstringgetgoodinternalized-runtime'], runtime_settings);
$.plot($("#randomstringgetgoodinternalized-memory"), chart_data['randomstringgetgoodinternalized-memory'], memory_settings);
});
</script>
<style>
body, * { font-family: sans-serif; }
div.chart {
width: 960px;
height: 560px;
}
div.xaxis-title {
width: 960px;
text-align: center;
font-style: italic;
font-size: small;
color: #666;
}
</style>
<h3>Random Access Existing Key/Value Pairs: Execution Time (strings)</h3>
<div class="chart" id="randomstringgetgoodinternalized-runtime"></div>
<div class="xaxis-title">number of entries in hash table</div>
<h3>Random Access Existing Key/Value Pairs: Memory Usage (strings)</h3>
<div class="chart" id="randomstringgetgoodinternalized-memory"></div>
<div class="xaxis-title">number of entries in hash table</div>
</body>
</html>