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
Jump 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
Test name
Executions per second
Double negation
228672736.0 Ops/sec
Boolean
233857408.0 Ops/sec
Boolean valueOf
161859984.0 Ops/sec
Related benchmarks:
Setting boolean
Negation vs normal boolean value
testtest12345232
Boolean vs !!
null vs !
double-bang-vs-boolean-cast2
Boolean vs !!4
test !! && Boolean()
Boolean vs !! - variable2
Boolean vs !! vs length
Comments
Confirm delete:
Do you really want to delete benchmark?