Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
var-let-const20
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36 OPR/113.0.0.0
Browser:
Opera 113
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
let
12.0M/s
const
12.0M/s
var
11.9M/s
View exact numbers
Test name
Executions per second
✓
let
12,035,012 Ops/sec
const
11,965,690 Ops/sec
var
11,859,591 Ops/sec
Script Preparation code:
function functionConst(arg) { const obj = {}; obj.fn = () => console.log(obj, arg); return obj; } function functionVar(arg) { var obj = {}; obj.fn = () => console.log(obj, arg); return obj; } function functionLet(arg) { let obj = {}; obj.fn = () => console.log(obj, arg); return obj; }
Tests:
const
functionConst(Math.random())
let
functionLet(Math.random())
var
functionVar(Math.random())