Benchmark name When Created
regex vs split/pop 3 years ago
Object.hasOwnProperty vs Object in vs Object[] vs Array.indexOf vs Array.includes vs Set.has 2 3 years ago
Object.hasOwnProperty vs Object in vs Object[] vs Array.indexOf vs Array.includes vs Set.has 3 years ago
addClass vs cache

test

3 years ago
String Search JS 3 years ago
String Search 3 years ago
Array slice.forEach vs for loop 3 years ago
Test-avi 3 years ago
reduce vs for loop vs forEach 100 count

A test summing 100 random numbers, 1 - 10000

3 years ago
parseInt vs toFixed vs tilde vs bitwise 3 years ago
parseInt vs toFixed vs ~~ 3 years ago
Object Literal x Switch - Rocketseat

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

3 years ago
innerhtml vs removechild vs remove(my version) 3 years ago
Math.max(...) vs reduce 3 years ago
Compare regexp vs literal creation and test 3 years ago
Array concat vs spread operator vs push for strings

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

3 years ago
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

3 years ago
constructor vs double negation 3 years ago
Lodash deep isEqual test

Test isEqual performance on deep objects

3 years ago
Math pow and double asterisk with floats 3 years ago
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.

3 years ago
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

3 years ago
RequireJS paths processing

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

3 years ago
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

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

 New benchmark Your benchmarks