Latest Benchmarks

Browse the latest JavaScript performance benchmarks created by the community.

Replace RegExp vs split

No description provided

Array.from vs Spread [...] from already existing array (to avoid deepCopy)

Speed test of Array.from against Spread ([...array]) syntax. Not using Set because the test case wanted here is to have 2 arrays with the same elements (in e.g. to avoid mutating the original array).

undefined vs. typeof vs. in vs. hasOwnProperty vs. obj[key]

Object lookup performance

Array.prototype.slice vs spread operator v3

Compare the new ES6 spread operator with the traditional slice() method

Array for vs Array for of vs Set for of vs Map for of

Testing the difference between native loops and find()

Array.at(i) vs Array[i]

No description provided

Binary Search vs Array.prototype.indexOf

I'm just wondering if it is optimized under the hood.

Create Large List

For benchmarking other programs

Document fragment creation cost

No description provided

for key in object iteration vs for of array iteration

No description provided

String indexing vs array indexing for string concatenation

Performance of different methods of buffer/array indexing to use characters in joined string.

String split + join or charAt + concat

Performance differences of using inbuilt string and array methods for splitting and joining char array. Or using loops to extract chars and string concatenation for joining.

Native JS: Array.join strings vs template literals vs String.concat vs string sum

find the best solution for concatenate strings

switch vs if js numbers

switch vs if

if-else vs switch2

No description provided

arrowfn vs expressionfn unnamedexpressionfn declarationfn

const arrowfn = (a, b) => a + b; const expressionfn = function add(a, b) { return a + b; }; const unnamedexpressionfn = function(a, b) { return a + b; }; function declarationfn(a, b) { return a + b; }

New set vs set clear2

No description provided

JavaScript with

Compare With to inline array mutation

lodash isEmpty vs native Object.keys

...

Check JSON.stringify with different object's complexity

No description provided

Comparing various JavaScript sorting methods (large workload #3)

No description provided

Comparing various JavaScript sorting methods (large workload #2)

No description provided

Comparing various JavaScript sorting methods (large workload)

No description provided

Comparing various JavaScript sorting methods

No description provided

Python range(a, b, n) in JavaScript

No description provided