2 Copyright (C) 2014 Apple Inc. All rights reserved.
4 Redistribution and use in source and binary forms, with or without
5 modification, are permitted provided that the following conditions
7 1. Redistributions of source code must retain the above copyright
8 notice, this list of conditions and the following disclaimer.
9 2. Redistributions in binary form must reproduce the above copyright
10 notice, this list of conditions and the following disclaimer in the
11 documentation and/or other materials provided with the distribution.
13 THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15 THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17 BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23 THE POSSIBILITY OF SUCH DAMAGE.
28 <title>JetStream @VERSION@ — In Depth Analysis</title>
30 <link rel="stylesheet" href="JetStream.css">
34 <a href="index.html"><img id="logo" src="JetStream-Logo.png" alt="JetStream"></a>
36 <h1>In Depth Analysis</h1>
39 JetStream combines a variety of JavaScript benchmarks, covering a variety of
40 advanced workloads and programming techniques, and reports a single score that
41 balances them using geometric mean.
45 Each benchmark measures a distinct workload, and no single optimization
46 technique is sufficient to speed up all benchmarks. Latency tests measure that a
47 web application can start up quickly, ramp up to peak performance quickly, and
48 run smoothly without interruptions. Throughput tests measure the sustained peak
49 performance of a web application, ignoring ramp-up time and spikes in
50 smoothness. Some benchmarks demonstrate tradeoffs, and aggressive or specialized
51 optimization for one benchmark might make another benchmark slower.
55 JetStream includes benchmarks from the SunSpider 1.0.2 and Octane 2 JavaScript
56 benchmark suites. It also includes benchmarks from the LLVM compiler open source
57 project, compiled to JavaScript using Emscripten 1.13. It also includes a
58 benchmark based on the Apache Harmony open source project's HashMap, hand-translated
63 These benchmarks cover both classical performance measurements — like Martin
64 Richards's machine and language independent benchmark (richards) and the
65 Dhrystone synthetic computing benchmark (dry.c) — and real-world examples — like
66 the Mozilla open source project's PDF renderer (pdfjs), the Box2D JavaScript
67 physics engine (box2d), and the jQuery and Closure JavaScript libraries (code-
68 first-load, code-multi-load).
75 <dd>3D cube rotation benchmark by Simon Speich. This benchmark was
76 previously published as part of SunSpider. The original can be found
77 on <a href="http://www.speich.net/computer/moztesting/3d.htm">Simon's
78 web page</a>. Tests arrays and floating-point math in relatively
79 short-running code. Source
80 code: <a href="sources/3d-cube.js">3d-cube.js</a></dd>
82 <a name="3d-raytrace">
84 <dd>Simple raytracer written by Oliver Hunt of the WebKit team. This benchmark was
85 originally published in SunSpider. Tests arrays and floating-point
86 math in relatively short-running code. Source
87 code: <a href="sources/3d-raytrace.js">3d-raytrace.js</a></dd>
91 <dd>Base64 encoder/decoder written in JavaScript, originally from the Mozilla XML-RPC client component. Tests string manipulation. This benchmark was previously published as part of SunSpider.
92 Source code: <a href="sources/base64.js">base64.js</a></dd>
94 <a name="code-first-load">
95 <dt>code-first-load</dt>
96 <dd>Test of code load speed of the jQuery and Closure libraries. This test attempts to defeat
97 the browser's caching capabilities by randomizing the source code, making it representative
98 of the first-load experience. This test was previously published in Octane version 2.
99 Source code: <a href="sources/code-first-load-code-load.js">code-load.js</a></dd>
101 <a name="code-multi-load">
102 <dt>code-multi-load</dt>
103 <dd>Test of code load speed of the jQuery and Closure libraries. Because this test allows
104 caching, this is representative of revisiting the same website.
105 This test was previously published in Octane version 1.
106 Source code: <a href="sources/code-multi-load-code-load.js">code-load.js</a></dd>
110 <dd>JavaScript implementation of the
111 <a href="http://en.wikipedia.org/wiki/CORDIC">CORDIC algorithm</a> by Rich Moore. Tests
112 floating point math in short-running code.
113 This benchmark was previously published as part of SunSpider.
114 Source code: <a href="sources/cordic.js">cordic.js</a></dd>
116 <a name="crypto-aes">
118 <dd><a href="http://en.wikipedia.org/wiki/Advanced_Encryption_Standard">Advanced Encryption
119 Standard (AES)</a> implementation in JavaScript by Chris Veness. A newer version can be found <a href="http://www.movable-type.co.uk/scripts/aes.html">here</a>. Tests integer math.
120 This benchmark was previously published as part of SunSpider.
121 Source code: <a href="sources/crypto-aes.js">crypto-aes.js</a></dd>
123 <a name="crypto-md5">
125 <dd><a href="http://en.wikipedia.org/wiki/Md5">MD5</a> implementation in JavaScript by
126 Paul Johnston and others. Tests interesting integer math idioms.
127 This benchmark was previously published as part of SunSpider.
128 Source code: <a href="sources/crypto-md5.js">crypto-md5.js</a></dd>
130 <a name="crypto-sha1">
132 <dd><a href="http://en.wikipedia.org/wiki/Sha1">SHA-1</a> implementation in JavaScript by
133 Paul Johnston and others. Tests interesting integer math idioms.
134 This benchmark was previously published as part of SunSpider.
135 Source code: <a href="sources/crypto-sha1.js">crypto-sha1.js</a></dd>
137 <a name="date-format-tofte">
138 <dt>date-format-tofte</dt>
139 <dd>Date and time formatting test, based on code by Svend Tofte. Involves an interesting use of <code>eval</code> and also
140 covers string manipulation and JavaScript library functions.
141 This benchmark was previously published as part of SunSpider.
142 Source code: <a href="sources/date-format-tofte.js">date-format-tofte.js</a></dd>
144 <a name="date-format-xparb">
145 <dt>date-format-xparb</dt>
146 <dd>Sophisticated date formatting and parsing library test, based on code by Barin Schwartz.
147 This benchmark was previously published as part of SunSpider.
148 Source code: <a href="sources/date-format-xparb.js">date-format-xparb.js</a></dd>
150 <a name="mandreel-latency">
151 <dt>mandreel-latency</dt>
152 <dd>Tests the <a href="http://bulletphysics.org/">Bullet</a> physics engine's performance
153 variability from iteration to iteration. This rewards JavaScript engines that have uniform
154 performance over time. The physics engine is compiled to JavaScript with
155 <a href="http://www.mandreel.com">Mandreel</a>. JetStream also reports the throughput score
156 for this test as <a href="#mandreel">mandreel</a>.
157 This benchmark was previously published in Octane version 2.
158 Source code: <a href="sources/mandreel.js">mandreel.js</a></dd>
162 <dd>Classic solar system simulation benchmark from
163 <a href="http://shootout.alioth.debian.org/">The Great Computer Language Shootout</a>,
164 contributed by Isaac Guy. Tests math and object access performance.
165 This benchmark was previously published in SunSpider.
166 Source code: <a href="sources/n-body.js">n-body.js</a></dd>
170 <dd>Regular-expression-based solution to DNA manipulation from
171 <a href="http://shootout.alioth.debian.org/">The Great Computer Language Shootout</a>,
172 contributed by Jesse Millikan.
173 This benchmark was previously published in SunSpider.
174 Source code: <a href="sources/regex-dna.js">regex-dna.js</a></dd>
176 <a name="splay-latency">
177 <dt>splay-latency</dt>
178 <dd>Tests the performance variability of manipulating a
179 <a href="http://en.wikipedia.org/wiki/Splay_tree">splay tree</a> represented using plain
180 JavaScript objects. JetStream also reports the throughput score for this test
181 as <a href="#splay">splay</a>. This benchmark was previously published in Octane version 2.
182 Source code: <a href="sources/splay.js">splay.js</a></dd>
186 <dd>Parses JSON and generates markup for a <a href="http://en.wikipedia.org/wiki/Tag_cloud">tag
187 cloud</a> view of the data. Written by Maciej Stachowiak of the WebKit team. Exercises string parsing and manipulation.
188 This benchmark was originally published in SunSpider.
189 Source code: <a href="sources/tagcloud.js">tagcloud.js</a></dd>
191 <a name="typescript">
193 <dd>Tests how quickly Microsoft's <a href="http://www.typescriptlang.org">TypeScript</a> compiler can
194 compile itself. This benchmark sets itself apart from the others due to its sheer size. More
195 than anything else this tests how quickly a JavaScript runtime can optimize a large pile of
197 This benchmark was previously published in Octane version 2.
198 Source code: <a href="sources/typescript.js">typescript.js</a>, <a href="sources/typescript-compiler.js">typescript-compiler.js</a>, <a href="sources/typescript-input.js">typescript-input.js</a></dd>
200 <a name="bigfib.cpp">
202 <dd>C++ program for computing very large Fibonacci numbers using a BigInt class, compiled to JavaScript with
203 Emscripten. Tests asm.js performance, with a focus on complex C++ data structures.
204 The original C++ version of this benchmark was previously published in the LLVM test suite.
205 Source code: <a href="sources/bigfib.cpp">bigfib.cpp</a>, <a href="sources/bigfib.cpp.js">bigfib.cpp.js</a></dd>
209 <dd>The Box2D physics engine <a href="https://code.google.com/p/box2dweb/">ported to JavaScript</a>. Tests floating point math and data structures.
210 This benchmark was previously published in Octane version 2.
211 Source code: <a href="sources/box2d.js">box2d.js</a></dd>
213 <a name="container.cpp">
214 <dt>container.cpp</dt>
215 <dd>Stepanov and Stroustrup's Standard
216 Container Benchmark compiled to JavaScript with
217 Emscripten. Tests asm.js performance, with a focus on complex C++ data structures.
218 The original C++ version of this benchmark was previously published in the LLVM test suite.
219 Source code: <a href="sources/container.cpp">container.cpp</a>, <a href="sources/container.cpp.js">container.cpp.js</a></dd>
223 <dd>RSA cypher implemented in JavaScript by Tom Wu. Tests integer math and arrays.
224 This benchmark was previously published in Octane version 2.
225 Source code: <a href="sources/crypto.js">crypto.js</a></dd>
227 <a name="delta-blue">
229 <dd>The classic DeltaBlue benchmark derived from a Smalltalk implementation by Maloney and
230 Wolczko. Tests devirtualization of JavaScript code that uses an idiomatic class hierarchy
232 This benchmark was previously published in Octane version 2.
233 Source code: <a href="sources/deltablue.js">deltablue.js</a></dd>
237 <dd>The classic Dhrystone benchmark program by Reinhold P. Weicker, translated from Ada to C
238 by Rick Richardson, and then compiled to JavaScript with Emscripten. Measures basic
239 integer arithmetic in asm.js code.
240 The original C version of this benchmark was previously published in the LLVM test suite.
241 Source code: <a href="sources/dry.c">dry.c</a>, <a href="sources/dry.c.js">dry.c.js</a></dd>
243 <a name="earley-boyer">
244 <dt>earley-boyer</dt>
245 <dd>Tests two classic Scheme benchmarks translated to JavaScript using scheme2js. The first
246 benchmark is Earley, is a chart parser algorithm due to Jay Earley. The second is
247 Boyer, a logic programming benchmark by Bob Boyer. Measures variadic functions and object
249 This benchmark was previously published in Octane version 2.
250 Source code: <a href="sources/earley-boyer.js">earley-boyer.js</a></dd>
252 <a name="float-mm.c">
254 <dd>Floating point matrix multiply benchmark, compiled to JavaScript with Emscripten.
255 The original C version of this benchmark was previously published in the LLVM test suite.
256 Source code: <a href="sources/float-mm.c">float-mm.c</a>, <a href="sources/float-mm.c.js">float-mm.c.js</a></dd>
260 <dd>Gameboy emulator written in JavaScript. Tests typed array and
261 property access performance. This benchmark was previously published in Octane version 2.
263 Source code: <a href="sources/gbemu-part1.js">gbemu-part1.js</a>, <a href="sources/gbemu-part2.js">gbemu-part2.js</a></dd>
265 <a name="gcc-loops.cpp">
266 <dt>gcc-loops.cpp</dt>
267 <dd>Example loops used to tune the GCC and LLVM vectorizers, compiled to JavaScript with
268 Emscripten. The original C++ version of this benchmark was previously published in the LLVM test suite.
269 Source code: <a href="sources/gcc-loops.cpp">gcc-loops.cpp</a></dd>
273 <dd>Apache Harmony java.util.HashMap implementation ported to JavaScript and benchmarked by
274 doing 500,000 inserts, 2,500,000 queries, and then iterating the associated entrySet. Tests
275 object-oriented JavaScript idioms and object construction. The JavaScript version of this benchmark
276 was originally published as part of the WebKit test suite.
277 Source code: <a href="sources/hash-map.js">hash-map.js</a></dd>
281 <dd>Tests the <a href="http://bulletphysics.org/">Bullet</a> physics engine's throughput.
282 The physics engine is compiled to JavaScript with
283 <a href="http://www.mandreel.com">Mandreel</a>. JetStream also reports the performance
285 for this test as <a href="#mandreel-latency">mandreel-latency</a>.
286 This benchmark was previously published in Octane version 2.
287 Source code: <a href="sources/mandreel.js">mandreel.js</a></dd>
291 <dd>Christoph Bauer's version of the classic solar system simulation benchmark from
292 <a href="http://shootout.alioth.debian.org/">The Great Computer Language Shootout</a>, written
293 in C and compiled to JavaScript with Emscripten. The original C version of this benchmark was previously published in the LLVM test suite.
294 Source code: <a href="sources/n-body.c">n-body.c</a>, <a href="sources/n-body.c.js">n-body.c.js</a></dd>
296 <a name="navier-stokes">
297 <dt>navier-stokes</dt>
298 <dd>Fluid simulation written by Oliver Hunt of the WebKit team. Emphasizes floating point array performance.
299 This benchmark was previously published in Octane version 2.
300 Source code: <a href="sources/navier-stokes.js">navier-stokes.js</a></dd>
304 <dd>Mozilla's <a href="http://mozilla.github.io/pdf.js/">PDF reader written in JavaScript</a>.
305 This benchmark emphasizes array manipulation and bit operations.
306 This benchmark was previously published in Octane version 2.
307 Source code: <a href="sources/pdfjs.js">pdfjs.js</a></dd>
309 <a name="proto-raytracer">
310 <dt>proto-raytracer</dt>
311 <dd>Ray tracer written in JavaScript using prototype.js. Tests object construction performance
312 and floating point math.
313 This benchmark was previously published in Octane version 2.
314 Source code: <a href="sources/raytrace.js">raytrace.js</a></dd>
316 <a name="quicksort.c">
318 <dd>Quicksort benchmark, compiled to JavaScript with Emscripten.
319 The original C version of this benchmark was previously published in the LLVM test suite.
320 Source code: <a href="sources/quicksort.c">quicksort.c</a>, <a href="sources/quicksort.c.js">quicksort.c.js</a></dd>
322 <a name="regexp-2010">
324 <dd>Collection of regular expressions found by the V8 team in 2010, curated into a benchmark.
325 This benchmark was previously published in Octane version 2.
326 Source code: <a href="sources/regexp.js">regexp.js</a></dd>
330 <dd>Martin Richard's <a href="http://www.cl.cam.ac.uk/~mr10/Bench.html">system language
331 benchmark</a> ported to JavaScript. Tests object property access performance.
332 This benchmark was previously published in Octane version 2.
333 Source code: <a href="sources/richards.js">richards.js</a></dd>
337 <dd>Tests the throughput of manipulating a
338 <a href="http://en.wikipedia.org/wiki/Splay_tree">splay tree</a> represented using plain
339 JavaScript objects. JetStream also reports the variability score for this test
340 as <a href="#splay-latency">splay-latency</a>.
341 This benchmark was previously published in Octane version 2.
342 Source code: <a href="sources/splay.js">splay.js</a></dd>
346 <dd>Towers of Hanoi benchmark from the LLVM test suite, compiled to JavaScript with Emscripten.
347 The original C version of this benchmark was previously published in the LLVM test suite.
348 Source code: <a href="sources/towers.c">towers.c</a>, <a href="sources/towers.c.js">towers.c.js</a></dd>
352 <dd>A benchmark based on compiling <a href="http://zlib.net">zlib</a> to JavaScript using
353 Emscripten. Based on the
354 <a href="https://github.com/kripken/emscripten/tree/master/tests/zlib">zlib emscripten
355 test</a> but modified to restrict code caching opportunities.
356 This benchmark was previously published in Octane version 2.
357 Source code: <a href="sources/zlib.js">zlib.js</a>, <a href="sources/zlib-data.js">zlib-data.js</a></dd>