Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
let vs const in a fix for-loop length
(version: 0)
Comparing performance of:
let vs const
Created:
2 years ago
by:
Guest
Jump to the latest result
Script Preparation code:
var gsmCells = [{ "countrycode": 250, "operatorid": 2, "lac": 9703, "cellid": 23446, "signal_strength": -75 }, { "countrycode": 250, "operatorid": 2, "lac": 9703, "cellid": 59141, "signal_strength": -76 }, { "countrycode": 250, "operatorid": 2, "lac": 9703, "cellid": 6924, "signal_strength": -80 }, { "countrycode": 250, "operatorid": 2, "lac": 9703, "cellid": 23449, "signal_strength": -81 } ];
Tests:
let
let max = gsmCells[0]; let n = gsmCells.length; for(let i = 0; i < n; i++){ if(gsmCells[i].signal_strength > max.signal_strength) max = gsmCells[i]; }
const
let max = gsmCells[0]; const n = gsmCells.length; for(let i = 0; i < n; i++){ if(gsmCells[i].signal_strength > max.signal_strength) max = gsmCells[i]; }
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
let
const
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!
Comments
Confirm delete:
Do you really want to delete benchmark?