-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathresults.html
245 lines (190 loc) · 12.8 KB
/
results.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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
<!DOCTYPE HTML>
<html lang="en" class="sidebar-visible no-js">
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title>Results - Comparing parallel Rust and C++</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff" />
<link rel="shortcut icon" href="favicon.png">
<link rel="stylesheet" href="css/variables.css">
<link rel="stylesheet" href="css/general.css">
<link rel="stylesheet" href="css/chrome.css">
<link rel="stylesheet" href="css/print.css" media="print">
<!-- Fonts -->
<link rel="stylesheet" href="FontAwesome/css/font-awesome.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500" rel="stylesheet" type="text/css">
<!-- Highlight.js Stylesheets -->
<link rel="stylesheet" href="highlight.css">
<link rel="stylesheet" href="tomorrow-night.css">
<link rel="stylesheet" href="ayu-highlight.css">
<!-- Custom theme stylesheets -->
</head>
<body class="light">
<!-- Provide site root to javascript -->
<script type="text/javascript">
var path_to_root = "";
var default_theme = "light";
</script>
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script type="text/javascript">
try {
var theme = localStorage.getItem('mdbook-theme');
var sidebar = localStorage.getItem('mdbook-sidebar');
if (theme.startsWith('"') && theme.endsWith('"')) {
localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1));
}
if (sidebar.startsWith('"') && sidebar.endsWith('"')) {
localStorage.setItem('mdbook-sidebar', sidebar.slice(1, sidebar.length - 1));
}
} catch (e) { }
</script>
<!-- Set the theme before any content is loaded, prevents flash -->
<script type="text/javascript">
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
document.body.className = theme;
document.querySelector('html').className = theme + ' js';
</script>
<!-- Hide / unhide sidebar before it is displayed -->
<script type="text/javascript">
var html = document.querySelector('html');
var sidebar = 'hidden';
if (document.body.clientWidth >= 1080) {
try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
sidebar = sidebar || 'visible';
}
html.classList.remove('sidebar-visible');
html.classList.add("sidebar-" + sidebar);
</script>
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="affix"><a href="introduction.html">Introduction</a></li><li class="affix"><a href="cpp_abi.html">Calling Rust functions from C++</a></li><li class="affix"><a href="v0.html">v0</a></li><li class="affix"><a href="v1.html">v1</a></li><li class="affix"><a href="v2.html">v2</a></li><li class="affix"><a href="v3.html">v3</a></li><li class="affix"><a href="v4.html">v4</a></li><li class="affix"><a href="v5.html">v5</a></li><li class="affix"><a href="v6.html">v6</a></li><li class="affix"><a href="v7.html">v7</a></li><li class="affix"><a href="results.html" class="active">Results</a></li><li class="affix"><a href="references.html">Additional reading</a></li></ol>
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>
<div id="page-wrapper" class="page-wrapper">
<div class="page">
<div id="menu-bar" class="menu-bar">
<div id="menu-bar-sticky-container">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light (default)</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
</div>
<h1 class="menu-title">Comparing parallel Rust and C++</h1>
<div class="right-buttons">
<a href="print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
</div>
</div>
</div>
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script type="text/javascript">
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
link.setAttribute('tabIndex', sidebar === 'visible' ? 0 : -1);
});
</script>
<div id="content" class="content">
<main>
<h1><a class="header" href="#benchmark-results" id="benchmark-results">Benchmark results</a></h1>
<p>All 8 implementations have so far been benchmarked on three different Intel CPUs.
You can find the benchmark program on <a href="https://github.com/parallel-rust-cpp/shortcut-comparison">GitHub</a>.</p>
<h2><a class="header" href="#benchmark-parameters" id="benchmark-parameters">Benchmark parameters</a></h2>
<ul>
<li>All benchmarks use an input array containing <code>6000 * 6000 = 36M</code> elements, allocated and initialized before the benchmark timing starts, and destroyed after the timing has ended.</li>
<li>All elements of the input array are single precision floating point numbers drawn uniformly at random from <code>[0, 1.0)</code>.</li>
<li>Before compiling the single-threaded benchmark programs, all parallel libraries were explicitly disabled using compile time switches.</li>
<li>When benchmarking in parallel, the parallel libraries were instructed to use 4 software threads and the benchmark process was bound with <a href="https://linux.die.net/man/1/taskset"><code>taskset</code></a> to 4 physical cores.</li>
</ul>
<h2><a class="header" href="#benchmark-1-intel-xeon-e3-1230-v5" id="benchmark-1-intel-xeon-e3-1230-v5">Benchmark 1: Intel Xeon E3-1230 v5</a></h2>
<ul>
<li>Mid-range server/workstation CPU with 4 physical cores and 8 hardware threads (hyper-threading).</li>
<li>Maximum clock speed <strong>3.8 GHz</strong>.</li>
<li><a href="https://ark.intel.com/content/www/us/en/ark/products/88182/intel-xeon-processor-e3-1230-v5-8m-cache-3-40-ghz.html">Intel specifications</a>.</li>
<li><a href="https://en.wikichip.org/wiki/intel/xeon_e3/e3-1230_v5">Wikichip</a>.</li>
</ul>
<p><img src="img/Xeon-E3-1230-v5/topology.png" alt="CPU topology of Xeon E3 1230 v5" /></p>
<h3><a class="header" href="#compiler-versions" id="compiler-versions">Compiler versions</a></h3>
<ul>
<li>C++ (GCC): <code>g++ 7.4.0-1ubuntu1</code></li>
<li>C++ (Clang): <code>clang 6.0.0-1ubuntu2</code></li>
<li>Rust: <code>rustc 1.38.0-nightly</code></li>
</ul>
<p><img src="img/Xeon-E3-1230-v5/multi_core.png" alt="]xeon-multi-core-img" /></p>
<p><img src="img/Xeon-E3-1230-v5/single_core.png" alt="]xeon-single-core-img" /></p>
<h2><a class="header" href="#benchmark-2-intel-i5-4690k" id="benchmark-2-intel-i5-4690k">Benchmark 2: Intel i5-4690k</a></h2>
<ul>
<li>Mid-range desktop CPU with 4 physical cores and 4 hardware threads (no hyper-threading).</li>
<li>Overclocked to <strong>4.3 GHz</strong>.</li>
<li><a href="https://ark.intel.com/content/www/us/en/ark/products/80811/intel-core-i5-4690k-processor-6m-cache-up-to-3-90-ghz.html">Intel specifications</a>.</li>
</ul>
<p><img src="img/i5-4690k/topology.png" alt="CPU topology of i5 4690k" /></p>
<h3><a class="header" href="#compiler-versions-1" id="compiler-versions-1">Compiler versions</a></h3>
<ul>
<li>C++ (GCC): <code>g++ 9.1.0</code></li>
<li>C++ (Clang): <code>clang 8.0.1</code></li>
<li>Rust: <code>rustc 1.38.0-nightly</code></li>
</ul>
<p><img src="img/i5-4690k/multi_core.png" alt="]i5-4690k-multi-core-img" /></p>
<p><img src="img/i5-4690k/single_core.png" alt="]i5-4690k-single-core-img" /></p>
<h2><a class="header" href="#benchmark-3-intel-i5-8250u" id="benchmark-3-intel-i5-8250u">Benchmark 3: Intel i5-8250U</a></h2>
<ul>
<li>Mid-range laptop CPU with 4 physical cores and 8 hardware threads.</li>
<li>Maximum clock speed <strong>3.4 GHz</strong>.</li>
<li><a href="https://ark.intel.com/content/www/us/en/ark/products/124967/intel-core-i5-8250u-processor-6m-cache-up-to-3-40-ghz.html">Intel specifications</a>.</li>
</ul>
<p><img src="img/i5-8250U/topology.png" alt="CPU topology of i5 8250U" /></p>
<h3><a class="header" href="#compiler-versions-2" id="compiler-versions-2">Compiler versions</a></h3>
<ul>
<li>C++ (GCC): <code>g++ 9.1.0</code></li>
<li>C++ (Clang): <code>clang 8.0.1</code></li>
<li>Rust: <code>rustc 1.38.0-nightly</code></li>
</ul>
<p><img src="img/i5-8250U/multi_core.png" alt="]i5-8250U-multi-core-img" /></p>
<p><img src="img/i5-8250U/single_core.png" alt="]i5-8250U-single-core-img" /></p>
</main>
<nav class="nav-wrapper" aria-label="Page navigation">
<!-- Mobile navigation buttons -->
<a rel="prev" href="v7.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a rel="next" href="references.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
<div style="clear: both"></div>
</nav>
</div>
</div>
<nav class="nav-wide-wrapper" aria-label="Page navigation">
<a href="v7.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a href="references.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
</nav>
</div>
<script src="clipboard.min.js" type="text/javascript" charset="utf-8"></script>
<script src="highlight.js" type="text/javascript" charset="utf-8"></script>
<script src="book.js" type="text/javascript" charset="utf-8"></script>
<!-- Custom JS scripts -->
</body>
</html>