Latest Benchmarks

Browse the latest JavaScript performance benchmarks created by the community.

tinybench demo: array iteration v2

Demo benchmark exercising the tinybench runner: compares three ways to sum an array.

tinybench + TypeScript demo: typed array sum v2

Demo benchmark with test cases written in TypeScript (type annotations are stripped in the browser by sucrase before running under the tinybench engine).

Object.fromEntries+map vs reduce

No description provided

Iterator.from vs array: filter+map

No description provided

jQuery 4.0.0 vs Vanilla JS

No description provided

getElementById raw vs function

No description provided

Javascript strings 'concat()' vs '+' vs `${}` when appending mulitple strings

No description provided

Reading Map vs Object/Record

No description provided

map vs slice

No description provided

Append with toSpliced vs Spread

No description provided

string charAtCode vs char

No description provided

lodash/fp/compact vs filter(Boolean)

No description provided

array creation (Array vs Array.from)

No description provided

Map.get vs Array.findIndex (small2)

which is faster

Map.get vs Array.findIndex (small)

which is faster

Set<string> vs Array<string> lookup (existing set)

Comparing performance of: Array Lookup vs Set Lookup when the values are string.

Array.includes() vs Set.has() small

No description provided

switch vs if benchmark

is switch faster than if

switch vs if test

is switch faster than if

switch vs if...else

Benchmark of the speed difference between using multiple IF statements and an open-ended IF/ELSE IF.

Creating New Object in Loop vs Resetting Object in Loop

This tests whether is is faster to create a new object every loop and assigning it default values is quicker than creating the object outside of the loop and resetting it's default values within the loop

Obj properties vs Just A Bunch of Variables

No description provided

Assign vs Manual Assignment

No description provided

Comparing performance of: split + join vs replace with callback vs replaceAll with callback

Comparing performance of: split + join vs replace with callback vs replaceAll with callback

larger map vs if vs switch

No description provided

NEW BENCHMARK Your Benchmarks