Benchmark name | When Created |
---|---|
regex vs split/pop | 4 years ago |
Object.hasOwnProperty vs Object in vs Object[] vs Array.indexOf vs Array.includes vs Set.has 2 | 4 years ago |
Object.hasOwnProperty vs Object in vs Object[] vs Array.indexOf vs Array.includes vs Set.has | 4 years ago |
addClass vs cache
test |
4 years ago |
String Search JS | 4 years ago |
Array slice.forEach vs for loop | 4 years ago |
Test-avi | 4 years ago |
reduce vs for loop vs forEach 100 count
A test summing 100 random numbers, 1 - 10000 |
4 years ago |
parseInt vs toFixed vs tilde vs bitwise | 4 years ago |
parseInt vs toFixed vs ~~ | 4 years ago |
Object Literal x Switch - Rocketseat
https://blog.rocketseat.com.br/substituindo-a-instrucao-switch-por-object-literal/ |
4 years ago |
innerhtml vs removechild vs remove(my version) | 4 years ago |
Compare regexp vs literal creation and test | 4 years ago |
Array concat vs spread operator vs push for strings
Compare the new ES6 spread operator with the traditional concat() method and push |
4 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 |
4 years ago |
constructor vs double negation | 4 years ago |
Lodash deep isEqual test
Test isEqual performance on deep objects |
4 years ago |
Math pow and double asterisk with floats | 4 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. |
4 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 |
4 years ago |
RequireJS paths processing
Replace path prefixes either by splitting and concatenating path parts or by looking up separators in the path. |
4 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 |
4 years ago |
memoized object assignment (new objects - flat) (moize.simple) | 4 years ago |
reduce tests with spread | 4 years ago |
memoized object assignment (new objects - flat) | 4 years ago |