Latest Benchmarks

Browse the latest JavaScript performance benchmarks created by the community.

parseInt vs toFixed vs tilde vs bitwise

No description provided

parseInt vs toFixed vs ~~

No description provided

Object Literal x Switch - Rocketseat

https://blog.rocketseat.com.br/substituindo-a-instrucao-switch-por-object-literal/

innerhtml vs removechild vs remove(my version)

No description provided

Compare regexp vs literal creation and test

No description provided

Array concat vs spread operator vs push for strings

Compare the new ES6 spread operator with the traditional concat() method and push

Initializing array with n undefined items

worth to note that the maximum callstack size is exceeded for the first test case (spread operator) with n = 1 million

constructor vs double negation

No description provided

Lodash deep isEqual test

Test isEqual performance on deep objects

Math pow and double asterisk with floats

No description provided

Truncating a number to an integer

~~, bitwise << and Math.trunc. Math.floor will always round down to the nearest integer, which means that for negative numbers it's going to be one less than all the other ones. You shouldn't use the others for rounding down for the same reason - the answer will be wrong for negative numbers.

Rounding to precision

Comparing performance of: toFixed(4) vs toPrecision(4).toString() vs (Math.round(*10000)/10000).toString(). Please note that Math.floor, Math.trunc and ~~ can't be used for accurate rounding

RequireJS paths processing

Replace path prefixes either by splitting and concatenating path parts or by looking up separators in the path.

Array concat vs spread operator vs push vs Array.prototype.push.apply

Compare the new ES6 spread operator with the traditional concat() method and push

memoized object assignment (new objects - flat) (moize.simple)

No description provided

reduce tests with spread

No description provided

memoized object assignment (new objects - flat)

No description provided

memoized object assignment (new objects)

No description provided

memoized object assignment

Comparing the performance of memoizeOne to other memoization libraries

memoizeOne - complex types - September 2020

Comparing the performance of memoizeOne to other memoization libraries

memoizeOne - September 2020

Comparing the performance of memoizeOne to other memoization libraries

uniqBy vs stringify performance

lodash vs javascript

Adding items to an array

spread vs concat vs unshift vs push There was also push.apply, but the browsers kept running out of memory for those tests. It worked only once. Here's a comparison with just the push results: arrayPush 4763922.0 Ops/sec arrayPush.apply 2666974.0 Ops/sec

set.has vs. array.includes vs array.indexOf (numeric values)

No description provided

Test JS endswith implementation2

No description provided