Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
bool && number vs number && bool
(version: 1)
compare speeds of comparison operators
Comparing performance of:
bool && number vs number && bool
Created:
10 months ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
const last = false; const left = 10; const right = 5; let count = 0;
Tests:
bool && number
if(last && left > right){count++;}
number && bool
if(left > right && last){count++;}
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
bool && number
number && bool
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
10 months ago
)
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36
Browser/OS:
Chrome 137 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
bool && number
204986064.0 Ops/sec
number && bool
199221232.0 Ops/sec
Related benchmarks:
> vs ==
!== vs ===
If/Else vs Ternary
Greater than or equals
Equality Comparison
typeof == vs typeof ===
in function call: if true vs if not return
boolean literal comparison vs typeof js
Which equals operator (!== vs > ) is faster?
Comments
Confirm delete:
Do you really want to delete benchmark?