Latest Benchmarks

Browse the latest JavaScript performance benchmarks created by the community.

Math.max with apply vs spread

Compare the new ES6 spread operator with the Math.max.apply method

substr vs startsWith

test perf of substr vs startsWith

for of vs forEach vs for

No description provided

Lodash vs Lodash FP (filter, range, add, isEven, reduce) v4

No description provided

Lodash reduce vs Lodash FP reduce

No description provided

Create an array with unique values - Lodash Uniq vs Javascript Set

No description provided

Callback vs Promise2

No description provided

Maping BooleanArray vs uInt8 Array2 vs uint8 with bitMasking _2

compare the map speed of an array of random true/false values compared to an ArrayBuffer with a uInt8 view of 0 or 1. The results are that the typed array is much much faster. There are two possible reasons I can think of for this. 1) JavaScript boolean type size of 4Bytes where as an element of a uInt8 array is actually 1Byte. 2) The ArrayBuffer is allocating contiguous memory resulting in a better cache hit ratio.

Get and Put image data on a canvas

No description provided

.startsWith vs .charAt for single character

Testing some things

Map .has() vs .get()

This is to compare the cost of this pattern ```if (map.has(key)) func1(map.get(key))``` v/s ```const v = map.get(key); if (v) func1(v);```

Array vs Linked List (push)

Manage Todos in a list - compare performance of Array vs Linked List.

object.assign vs spread vs create new object object.assign

No description provided

concat vs lodash.concat

No description provided

Object Deep Copy

Produce a deep copy of a Javascript object where nested objects are not simply references to the originals.

xprod (custom impl vs ramda)

No description provided

sortWith (custom impl vs ramda) #2

No description provided

JS v JQ

JS v JQ

Performance Test: Template element selection

No description provided

lodash.head() vs [0]

Is head() needed only to check length !== 0 ? P.s. Empty testcase for [0] is useless because it won't crash on trying to get nonexistent element

lodash forEach vs for i loop

No description provided

Deep merge

Spread vs lodash vs seamless-immutable

Quake InvertSqrt

No description provided

Fast Sqrt

Compare Quakes fast inverse squareroot

className vs. setAttribute data attribute vs. classList

Evaluate setting data attributes vs classes

NEW BENCHMARK Your Benchmarks