Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
[JS] nested if
(version: 2)
Comparing performance of:
if nested vs if one vs if single
Created:
one year ago
by:
Registered User
Jump to the latest result
Script Preparation code:
var test = 0.4; var lTimeQuantInSeconds_num = 1;
Tests:
if nested
if (test < lTimeQuantInSeconds_num) { if (test < lTimeQuantInSeconds_num * 0.5) { test = 0; } }
if one
if (test < lTimeQuantInSeconds_num && test < lTimeQuantInSeconds_num * 0.5) { test = 0; }
if single
if (test < lTimeQuantInSeconds_num * 0.5) { test = 0; }
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (3)
Previous results
Fork
Test case name
Result
if nested
if one
if single
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36
Browser/OS:
Chrome 133 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
if nested
9270483.0 Ops/sec
if one
9370201.0 Ops/sec
if single
9251787.0 Ops/sec
Related benchmarks:
JS if/if vs if/else if
if cond
!== vs ===
test of equals
= vs <
If else vs If and
JS if/if vs if/or
if/if VS if/or
Test if if and if else
Comments
Confirm delete:
Do you really want to delete benchmark?