Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Boolean valueOf vs !! test
(version: 1)
Comparing performance of:
Double negation vs Boolean vs Boolean valueOf
Created:
one year ago
by:
Guest
Go to the latest result
Script Preparation code:
var test = true;
Tests:
Double negation
!!test
Boolean
Boolean(test)
Boolean valueOf
Boolean(test).valueOf()
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (3)
Previous results
Fork
Test case name
Result
Double negation
Boolean
Boolean valueOf
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/135.0.0.0 Safari/537.36
Browser/OS:
Chrome 135 on Mac OS X 10.15.7
View result in a separate tab
Embed
Embed Benchmark Result
Boolean
233.9M/s
Double negation
228.7M/s
Boolean valueOf
161.9M/s
View exact numbers
Test name
Executions per second
✓
Boolean
233,857,408 Ops/sec
Double negation
228,672,736 Ops/sec
Boolean valueOf
161,859,984 Ops/sec
Related benchmarks
Boolean vs !!
Boolean vs !!4
Boolean vs !! vs length
Comments
Confirm delete:
Do you really want to delete benchmark?