Skip to content

Performance Comparison Between Builtin JavaScriptCore and {N}'s one

Martin Bektchiev edited this page Aug 15, 2018 · 5 revisions

Methodology

Run algorithms taken from Octane in a {N} and ReactNative applications on a button press. Each algorithm is run a specified number of times and the time is tracked and logged.

var algo = 'richards';
var f = require(`./${algo}`);
var start = new Date();
for (var i = 0; i < 100; ++i) {
	f();
}
var end = new Date();
console.log(`"${algo} elapsed: ${((end.getTime() - start.getTime()))} ms`);

iOS 11.4.1 vs {N} version 4.2

Hardware:

iPhoneXModules
iPhone X 64GB
Model MQAD2GH/A
S/N DNPVVDXQJCLJ
iOS v 11.4.1 (15G77)
Algorithm {N} (ms) RN (ms) Remarks
100x DeltaBlue 620 - 840 630 - 760
100x Richards 320 - 380 350 - 380
100x Crypto.encrypt 350 - 400 375 - 400
Clone this wiki locally