Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
lodash uniq vs native uniq with long array
(version: 1)
Comparing performance of:
native uniq vs ld uniq
Created:
one year ago
by:
Guest
Go to the latest result
HTML Preparation code:
<script src='https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.5/lodash.min.js'></script>
Script Preparation code:
var obj = [1, 2, 3, 4, 6, 6, 4, 1, 2, 2, 3,1, 2, 3, 4, 6, 6, 4, 1, 2, 2, 3,1, 2, 3, 4, 6, 6, 4, 1, 2, 2, 3,1, 2, 3, 4, 6, 6, 4, 1, 2, 2, 3,1, 2, 3, 4, 6, 6, 4, 1, 2, 2, 3,1, 2, 3, 4, 6, 6, 4, 1, 2, 2, 3,1, 2, 3, 4, 6, 6, 4, 1, 2, 2, 3,1, 2, 3, 4, 6, 6, 4, 1, 2, 2, 3,1, 2, 3, 4, 6, 6, 4, 1, 2, 2, 3,1, 2, 3, 4, 6, 6, 4, 1, 2, 2, 3,1, 2, 3, 4, 6, 6, 4, 1, 2, 2, 3,1, 2, 3, 4, 6, 6, 4, 1, 2, 2, 3,1, 2, 3, 4, 6, 6, 4, 1, 2, 2, 3,1, 2, 3, 4, 6, 6, 4, 1, 2, 2, 3,1, 2, 3, 4, 6, 6, 4, 1, 2, 2, 3,1, 2, 3, 4, 6, 6, 4, 1, 2, 2, 3,1, 2, 3, 4, 6, 6, 4, 1, 2, 2, 3,1, 2, 3, 4, 6, 6, 4, 1, 2, 2, 3,1, 2, 3, 4, 6, 6, 4, 1, 2, 2, 3,1, 2, 3, 4, 6, 6, 4, 1, 2, 2, 3,1, 2, 3, 4, 6, 6, 4, 1, 2, 2, 3,1, 2, 3, 4, 6, 6, 4, 1, 2, 2, 3,1, 2, 3, 4, 6, 6, 4, 1, 2, 2, 3,1, 2, 3, 4, 6, 6, 4, 1, 2, 2, 3,1, 2, 3, 4, 6, 6, 4, 1, 2, 2, 3,1, 2, 3, 4, 6, 6, 4, 1, 2, 2, 3,1,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 2, 3, 4, 6, 6, 4, 1, 2, 2, 3,1, 2, 3, 4, 6, 6, 4, 1, 2, 2, 3,1, 2, 3, 4, 6, 6, 4, 1, 2, 2, 3,1, 2, 3, 4, 6, 6, 4, 1, 2, 2, 3,1, 2, 3, 4, 6, 6, 4, 1, 2, 2, 3,1, 2, 3, 4, 6, 6, 4, 1, 2, 2, 3,1, 2, 3, 4, 6, 6, 4, 1, 2, 2, 3,1, 2, 3, 4, 6, 6, 4, 1, 2, 2, 3,1, 2, 3, 4, 6, 6, 4, 1, 2, 2, 3,1, 2, 3, 4, 6, 6, 4, 1, 2, 2, 3,1, 2, 3, 4, 6, 6, 4, 1, 2, 2, 3,1, 2, 3, 4, 6, 6, 4, 1, 2, 2, 3,1, 2, 3, 4, 6, 6, 4, 1, 2, 2, 3,1, 2, 3, 4, 6, 6, 4, 1, 2, 2, 3,1, 2, 3, 4, 6, 6, 4, 1, 2, 2, 3,1, 2, 3, 4, 6, 6, 4, 1, 2, 2, 3,1, 2, 3, 4, 6, 6, 4, 1, 2, 2, 3,1, 2, 3, 4, 6, 6, 4, 1, 2, 2, 3,1, 2, 3, 4, 6, 6, 4, 1, 2, 2, 3,1, 2, 3, 4, 6, 6, 4, 1, 2, 2, 3,1, 2, 3, 4, 6, 6, 4, 1, 2, 2, 3,1, 2, 3, 4, 6, 6, 4, 1, 2, 2, 3,1, 2, 3, 4, 6, 6, 4, 1, 2, 2, 3,1, 2, 3, 4, 6, 6, 4, 1, 2, 2, 3,1, 2, 3, 4, 6, 6, 4, 1, 2, 2, 3,1, 2, 3, 4, 6, 6, 4, 1, 2, 2, 3,];
Tests:
native uniq
let u = new Set(obj);
ld uniq
let u = _.uniq(obj);
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
native uniq
ld uniq
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36
Browser/OS:
Chrome 136 on Mac OS X 10.15.7
View result in a separate tab
Embed
Embed Benchmark Result
native uniq
186K/s
ld uniq
185K/s
View exact numbers
Test name
Executions per second
✓
native uniq
185,527 Ops/sec
ld uniq
184,683 Ops/sec
Related benchmarks
set.has vs. array.includes bigger sample
set.has vs. array.includes (with big array)
JS fastest unique array Set vs uniq vs filter
Comments
Confirm delete:
Do you really want to delete benchmark?