Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
String falsy test
(version: 0)
Comparing performance of:
falsy vs boolean
Created:
3 years ago
by:
Guest
Jump to the latest result
Script Preparation code:
var s1 = 'i am something'; var s2 = ''; var s3; var b1 = false; var b2 = false; var b3 = true;
Tests:
falsy
if (!s1) { } else {} if (!s2) { } else {} if (!s3) { } else {}
boolean
if (!b1) { } else {} if (!b2) { } else {} if (!b3) { } else {}
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
falsy
boolean
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:
if !== or ===
if !== or === v2
Boolean conversion - javascript
if undefined vs falsy
If vs Object Literal
Comments
Confirm delete:
Do you really want to delete benchmark?