Latest Benchmarks

Browse the latest JavaScript performance benchmarks created by the community.

TextDecoder vs String.fromCharCode 2023

No description provided

Object.values(...).find(...) vs _.find(...,...)

No description provided

ArrayBuffer encoding / decoding methods

Array.from() vs TextDecoder() and new Uint8Array() vs TextEncoder()

new Array() vs Array.from()

Test Array creation methods on a random ArrayBuffer

new Uint8Array() vs Uint8Array.from()

Test ArrayBuffer creation methods on a random Array

Assign once vs destructure twice

No description provided

Array split vs string substring. For all split strings (v1)

No description provided

Javascript Sort (numbers/strings)

Port from jsperf(https://jsperf.com/sorting-algorithms/58)

Javascript Sort

Port from jsperf(https://jsperf.com/sorting-algorithms/58)

object-hash vs JSON.stringify

No description provided

startWith/includes

No description provided

Array.includes() vs Set.has()

No description provided

Array.find vs. Map.get

Test the performance of Array.find vs. Map.get, with various array sizes, and with/without conversion from array to map

ISO 8601 vs Epoch

No description provided

ISO 8601

No description provided

test map vs reduce

No description provided

Array .push() vs .unshift() |

No description provided

array iteration speed v2

Compare loop performance

Unsorted TC-DOHSIM for..of vs reduce

Testing DOHSIM shuffled performance of find vs for

Shuffled TC-DOHSIM find vs for...of

Testing DOHSIM shuffled performance of find vs for

TC-DOHSIM find vs for...of

Testing DOHSIM performance of find vs for

Classnames vs CLSX @ 2023-02-15

No description provided

Decimal Rounding - Exponential notation vs Number.EPSILON vs Double rounding vs Double rounding v2

A benchmark for solutions that provide accurate decimal rounding, flooring, and ceiling to a specific number of decimal places. These solutions treat floats more like decimals by fixing the binary rounding issues to avoid unexpected results. Solution 1: converting the number to a string in the exponential notation (e.g., num + "e" + decimalPlaces). Solution 2: purely mathematical (Number.EPSILON) Solution 3: double rounding. This solution uses the Number.prototype.toPrecision() method to strip the floating-point round-off errors. Solution 4: double rounding v2. This solution is just like Solution 3, however it uses a custom toPrecision() function.

ParentNode Test

No description provided

lodash@4.17.15 uniq vs new Set() (w/ datetime strings)

Comparing uniq vs new Set using a mid-sized array (length: 239) of datetime strings.