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
var
32.9M/s
const
32.9M/s
let
32.7M/s
View exact numbers
Test name
Executions per second
✓
var
32,946,934 Ops/sec
const
32,917,840 Ops/sec
let
32,665,852 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())