forked from mackstann/hash-table-shootout
-
Notifications
You must be signed in to change notification settings - Fork 2
/
charts_int_set.html
90 lines (71 loc) · 5.55 KB
/
charts_int_set.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
<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 = {"randomset-memory": [{"data": [[2000000, 2604720128], [6000000, 2872360960], [10000000, 3178082304], [14000000, 3339055104], [18000000, 3499003904], [22000000, 3808075776], [26000000, 3968000000], [30000000, 4127924224]], "label": "llvm unordered_map Apple clang version version 4.1 (tags/Apple/clang-421.11.66) (based on LLVM 3.1svn) std::tr1::unordered_map [std::string]"}, {"data": [[2000000, 2591199232], [6000000, 2874855424], [10000000, 3242397696], [14000000, 3274395648], [18000000, 3977490432], [22000000, 4009488384], [26000000, 4041486336], [30000000, 4073484288]], "label": "Lua 5.2.1 (C API) table (via LuaHashMap)"}, {"data": [[2000000, 2645155840], [6000000, 2962374656], [10000000, 3254423552], [14000000, 3672301568], [18000000, 3964358656], [22000000, 4248014848], [26000000, 4531671040], [30000000, 4815327232]], "label": "Tcl 8.5 (C API) hash"}, {"data": [[2000000, 2808954880], [6000000, 3439702016], [10000000, 3667783680], [14000000, 4298534912], [18000000, 4526624768], [22000000, 4753690624], [26000000, 5787078656], [30000000, 6014111744]], "label": "Python 2.7.2 (C API) dict"}, {"data": [[2000000, 3005190144], [6000000, 4100460544], [10000000, 5236629504], [14000000, 6179872768], [18000000, 7382097920], [22000000, 8315871232], [26000000, 9248595968], [30000000, 10189774848]], "label": "Perl 5.12.4 built for darwin-thread-multi-2level (C API) hash"}, {"data": [[2000000, 2581843968], [6000000, 2751217664], [10000000, 2930028544], [14000000, 3124559872], [18000000, 3285557248], [22000000, 3445481472], [26000000, 3672518656], [30000000, 3832442880]], "label": "Ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0] (C API) Hash"}], "randomset-runtime": [{"data": [[2000000, 0.766084], [6000000, 2.458498], [10000000, 4.31621], [14000000, 6.390459], [18000000, 8.710677], [22000000, 10.785746], [26000000, 13.194786], [30000000, 15.75117]], "label": "llvm unordered_map Apple clang version version 4.1 (tags/Apple/clang-421.11.66) (based on LLVM 3.1svn) std::tr1::unordered_map [std::string]"}, {"data": [[2000000, 0.587231], [6000000, 1.964728], [10000000, 3.535122], [14000000, 5.935896], [18000000, 6.894328], [22000000, 9.375403], [26000000, 12.272361], [30000000, 15.494519]], "label": "Lua 5.2.1 (C API) table (via LuaHashMap)"}, {"data": [[2000000, 0.889021], [6000000, 2.769795], [10000000, 5.85421], [14000000, 6.660153], [18000000, 9.11871], [22000000, 11.840113], [26000000, 14.948821], [30000000, 18.512815]], "label": "Tcl 8.5 (C API) hash"}, {"data": [[2000000, 1.05183], [6000000, 3.573008], [10000000, 6.439762], [14000000, 9.524007], [18000000, 12.734021], [22000000, 15.979375], [26000000, 19.081656], [30000000, 22.61152]], "label": "Python 2.7.2 (C API) dict"}, {"data": [[2000000, 2.11082], [6000000, 6.942845], [10000000, 11.896725], [14000000, 17.827529], [18000000, 22.466325], [22000000, 28.402279], [26000000, 34.724047], [30000000, 41.35424]], "label": "Perl 5.12.4 built for darwin-thread-multi-2level (C API) hash"}, {"data": [[2000000, 1.133451], [6000000, 4.467934], [10000000, 7.102918], [14000000, 8.892991], [18000000, 13.265009], [22000000, 18.411137], [26000000, 17.859875], [30000000, 22.487973]], "label": "Ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0] (C API) Hash"}]}
$(function () {
$.plot($("#randomset-runtime"), chart_data['randomset-runtime'], runtime_settings);
$.plot($("#randomset-memory"), chart_data['randomset-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 Updates to Existing Key/Value Pairs: Execution Time (integers)</h3>
<div class="chart" id="randomset-runtime"></div>
<div class="xaxis-title">number of entries in hash table</div>
<h3>Random Updates to Existing Key/Value Pairs: Memory Usage (integers)</h3>
<div class="chart" id="randomset-memory"></div>
<div class="xaxis-title">number of entries in hash table</div>
</body>
</html>