Benchmark name | When Created |
---|---|
for-in vs object.keys (2) | 2 years ago |
Lodash Times vs Array.from callback
_times(n,()=>func()) vs. Array.from({length: n},(_,i) => func()) |
2 years ago |
mathjs random vs Math.random | 2 years ago |
startsWith vs substring vs indexOf
startsWith vs substring vs indexOf |
2 years ago |
binaryStringPad
testing 3 methods of padding binary string |
2 years ago |
string vs number vs symbol | 2 years ago |
String() vs .toString() vs Concatenation vs Template string | 2 years ago |
String() vs .toString() vs ''+ vs Template string | 2 years ago |
Caching length property vs getting it each time in the loop - ak
save length of the array in the variable vs get it the loop |
2 years ago |
new Date("2020-03-20 0:04:02").getDate() | 2 years ago |
Iteration Speed 2 | 2 years ago |
StringInterpolation vs stringConcatenation | 2 years ago |
Teste some vs find | 2 years ago |
Some vs Find 100k items | 2 years ago |
Array loop vs foreach (static & index) | 2 years ago |
case insensitive comparison | 2 years ago |
slice vs substring check010
slice vs substring |
2 years ago |
Different ways (template importNode, vanilla js, innerHTML) to create DOM node | 2 years ago |
DOM get attributes of children vs JS Array READ performance v3
Results: Reading the DOM with nextElementSibling + getAttribute is less than 5% slower than an JS array list. textContent is slightly faster than a JS array list, and nodeValue is 3X faster. Listing a JS array in a for i-- loop backwards yield ~2X performance |
2 years ago |
Fastest way to list children: childNodes vs children vs firstChild/nextSibling vs firstElementChild/nextElementSibling v2 fixed
Result: firstElementChild is the fastest yielding 3-4X performance. With lastElementChild close (margin of error) 2nd. Other observations: doing for loop i-- with children shows ~150% higher performance vs i++. And unloading it into a variable prior yields another ~200% boost |
2 years ago |
Fastest way to list children: childNodes vs children vs firstChild/nextSibling vs firstElementChild/nextElementSibling v2
Result: firstElementChild is the fastest yielding 3-4X performance. With lastElementChild close 2nd. Other observations: doing for loop i-- with children shows ~150% higher performance vs i++. And unloading it into a variable prior yields another ~200% boost |
2 years ago |
foreach vs map by wayne | 2 years ago |
1 iter vs 3 iter 3 | 2 years ago |
1 iter vs 3 iter | 2 years ago |
Direct Array vs Typed Array vs Array read performances | 2 years ago |