Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Native array length vs Lodash's isEmpty
(version: 0)
Comparing performance of:
native undefined vs isEmpty undefined vs native array vs isEmpty array
Created:
5 years ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.11/lodash.core.js"></script>
Script Preparation code:
var collection1 = undefined var collection2 = [1, 2, 3] var isEmpty = _.isEmpty
Tests:
native undefined
!!(collection1 && collection1.length)
isEmpty undefined
isEmpty(collection1)
native array
!!(collection1 && collection1.length)
isEmpty array
isEmpty(collection2)
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (4)
Previous results
Fork
Test case name
Result
native undefined
isEmpty undefined
native array
isEmpty array
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Related benchmarks:
_.isEmpty vs Array.length
_.isEmpty vs. Array.length
Lodash isEmpty vs native .isArray + length
Native !!collection?.length vs Lodash's !isEmpty
Comments
Confirm delete:
Do you really want to delete benchmark?