Latest Benchmarks

Browse the latest JavaScript performance benchmarks created by the community.

className vs. setAttribute vs. classListasdfa

No description provided

String to number, parseInt, +, or * 1

Which method of casting a string to a number is fastest

includes vs regex

No description provided

Longer regex test vs string includes

No description provided

Long regex test vs string includes

No description provided

toMap - iterative vs .map

No description provided

Lodash.assign vs Object.assign vs spread assign

Measuring approaches performance

array indexOf vs includes vs some - 100 numbers, find middle

performance comparison of ways to find if an array contains a value

IndexOf vs Includes in string 24

Banana

replaceAll vs regex with g flag

No description provided

redcue vs flatMap

No description provided

str.match vs str.split vs deconstruction

Test String.match with regex against String.split with string and string deconstruction. We are splitting a string at the spaces.

Javascript string.endsWith vs string.slice and tripple equal (one char)

No description provided

Large JSON comparsion

No description provided

replace vs substring2w22

Test the performance of replace() vs substring() vs slice() when replacing a char at the beginning of a (in this case uri query-)string that may or may not be there. Added the combined brackets[ ] + substr() method, since it's always the first char we wan't to pop off. Inspired by https://jsperf.com/replace-or-substr. Note: could not get 'let' and 'const' to work. Well, too bad...

flatMap vs reduce vs loop filtering performance vs filter

https://stackoverflow.com/a/77247681

lodash.intersection vs Vanilla JS

No description provided

queryall vs classname

No description provided

querySelector vs querySelectorAll vs getElementsByClassName vs querySelector (ID) vs getElementsByID 20x

No description provided

regex v split parsez

No description provided

regex v split

No description provided

instanceof vs number

No description provided

Transform: Object.fromEntries vs reduce (100 entries)

No description provided

Transform: Object.fromEntries vs reduce (10000 entries)

No description provided

Transform: Object.fromEntries vs reduce (small dataset)

No description provided

NEW BENCHMARK Your Benchmarks