Latest Benchmarks

Browse the latest JavaScript performance benchmarks created by the community.

Native ranged random vs Lodash ranged random - long range

No description provided

Native ranged random vs Lodash ranged random - short range

No description provided

function name alias vs invocation 2

No description provided

function name alias vs invocation

No description provided

string concat: concat vs +

No description provided

Large Array: concat vs spread vs push

Compares the three mechanisms for combining arrays with 1k arrays

Lodash orderBy vs custom

No description provided

lodash chunk vs native

No description provided

Lodash sort vs array.prototype.sort (strings)

No description provided

Count Array Duplicates

No description provided

Perf difference when using looping over collection vs creating a cached projection for that access pattern (large array)

Intent is to measure the benefit of creating multiple "cache projections" (for lack of a better name) when using Redux Toolkit's EntityAdapter. It already handles everything in an "entities" object (keys are ids, values are the entity) and manages a list of ids separately. If we want to access a specific item based on the value of another key on that object, we are forced to loop through all the entities (either with Object.keys, Object.values, a for..in, or using the ids list) to find it. The solution tested here is to maintain another object that's simply a mapping between the key we want to look for and the id of the corresponding object for fast access. It is obviously faster, but by how much?

Perf difference when using looping over collection vs creating a cached projection for that access pattern (medium array)

Intent is to measure the benefit of creating multiple "cache projections" (for lack of a better name) when using Redux Toolkit's EntityAdapter. It already handles everything in an "entities" object (keys are ids, values are the entity) and manages a list of ids separately. If we want to access a specific item based on the value of another key on that object, we are forced to loop through all the entities (either with Object.keys, Object.values, a for..in, or using the ids list) to find it. The solution tested here is to maintain another object that's simply a mapping between the key we want to look for and the id of the corresponding object for fast access. It is obviously faster, but by how much?

Map vs Object: Full benchmark

Lookup of map vs object

Perf difference when using looping over collection vs creating a cached projection for that access pattern (small array)

Intent is to measure the benefit of creating multiple "cache projections" (for lack of a better name) when using Redux Toolkit's EntityAdapter. It already handles everything in an "entities" object (keys are ids, values are the entity) and manages a list of ids separately. If we want to access a specific item based on the value of another key on that object, we are forced to loop through all the entities (either with Object.keys, Object.values, a for..in, or using the ids list) to find it. The solution tested here is to maintain another object that's simply a mapping between the key we want to look for and the id of the corresponding object for fast access. It is obviously faster, but by how much?

Perf difference when using find on collection vs creating a cached projection for that access pattern

Intent is to measure the benefit of creating multiple "cache projections" (for lack of a better name) when using Redux Toolkit's EntityAdapter. It already handles everything in an "entities" object (keys are ids, values are the entity) and manages a list of ids separately. If we want to access a specific item based on the value of another key on that object, we are forced to loop through all the entities (either with Object.values, a for..in or using the ids list) to find it. The solution tested here is to maintain another object that's simply a mapping between the key we want to look for and the id of the corresponding object for fast access.

.find() vs direct access in object by id

No description provided

bfbcvbvbbv

bvbvcbvvb

Replace_12211fd

No description provided

asdasdasdasdad

No description provided

Closure vs non-closure

No description provided

Vanilla JS VS JQuery 3.6.0 DOM perfomance

Vanilla JS VS JQuery 3.6.0 DOM perfomance

testingggs3

No description provided

array.prototype.at() vs array[array.length - 1]

which one is faster for reaching last item of an array

lodash vs arr

No description provided

array include vs set has

array include vs set has