Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
check array size with and without neg
(version: 0)
Comparing performance of:
check true vs check false
Created:
3 years ago
by:
Guest
Jump to the latest result
Script Preparation code:
var arr = ['1', '2', '3'];
Tests:
check true
if (arr.length) { return arr; } return undefined;
check false
if (!arr.length) { return ; } return arr;
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
check true
check false
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:
JS array emptiness check
check if array is empty or not using length and at method
array.length vs array.length > 0 without console.log
array.length = 0 vs []
Comments
Confirm delete:
Do you really want to delete benchmark?