Latest Benchmarks

Browse the latest JavaScript performance benchmarks created by the community.

Map.get() !== undefined VS Map.has() + .get()

Performance comparison of Map.get() !== undefined to check if element exists and Map.has() as most of the time you need the element after the .has() check anyway. LIMITATION: The checks are not completely the same. If the map contains a key whose value is intentionally set to undefined (Map.set(1, undefined)), .has() will return true, while the .get() !== undefined will be false.

reduce concat vs reduce spread performance

No description provided

str.charAt(0).toLowerCase() vs str.toLowerCase()

No description provided

String indexOf vs endsWith

No description provided

Object isEmpty: for-in vs Object.keys

Compares performance of using for-in vs Object.keys for checking emptiness of an object.

javascript loops with setup code

No description provided

simple instanceof vs. getter vs. instance property

Compare the basic performance of different ways of checking whether a given item is an instance of a specific class.

validateCsvEntry

No description provided

lazy getters vs proxy vs property

No description provided

lazy getters vs proxy

No description provided

getters vs proxy

No description provided

Date JS VS MomentJS VS Date-Fns - isValid

No description provided

Date JS VS Date-Fns VS MomentJS - startOfDay

No description provided

Date JS VS Date-Fns VS MomentJS - differenceInSeconds

No description provided

MomentJS VS Date VS Date-Fns - getTtlFromKey #4

No description provided

Set difference comparison

No description provided

JS dataset Vs. classList read vs write

No description provided

dataset vs classList

No description provided

json stringify parse vs spread vs structuredClone

No description provided

Date JS VS MomentJS - isDate/isMoment

No description provided

Date JS VS MomentJS - isValid

No description provided

Date JS VS Date-Fns - startOfDay

No description provided

Date JS VS Date-Fns - differenceInSeconds

No description provided

MomentJS VS Date VS Date-Fns - getTtlFromKey #3

No description provided

MomentJS VS Date VS Date-Fns - getRoundedDate #2

No description provided