Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
lodash difference with long strings
(version: 1)
Comparing performance of:
With 1000 vs With 10000 vs With 100000
Created:
one year ago
by:
Guest
Jump 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:
function generateRandomStrings(count = 1000, length = 128) { const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; const charLen = chars.length; return Array.from({ length: count }, () => { let s = ''; for (let i = 0; i < length; i++) { s += chars.charAt(Math.floor(Math.random() * charLen)); } return s; }); } var a = generateRandomStrings(); var b = generateRandomStrings(); var c = generateRandomStrings(10000, 128); var d = generateRandomStrings(10000, 128); var e = generateRandomStrings(100000, 128); var f = generateRandomStrings(100000, 128);
Tests:
With 1000
_.difference(a, b)
With 10000
_.difference(c, d)
With 100000
_.difference(e, f)
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (3)
Previous results
Fork
Test case name
Result
With 1000
With 10000
With 100000
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/134.0.0.0 Safari/537.36
Browser/OS:
Chrome 134 on Mac OS X 10.15.7
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
With 1000
14968.8 Ops/sec
With 10000
1322.5 Ops/sec
With 100000
95.6 Ops/sec
Related benchmarks:
Lodash _.some vs _.includes vs array.find
Lodash vs vanila 2
IndexOf vs Includes vs lodash includes vs dictionary with large array
.concat() is slow (immutable) vs .push() (mutation)
reduce: spreading acc vs mutating acc
Object.values() vs Array.from(Map.values())
Lodash _.some vs _.includes vs array.find vs array.some vs _.find
javascript case insensitive compare with -1 0 1 for sorting
Checking array equality
Comments
Confirm delete:
Do you really want to delete benchmark?