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/129.0.0.0 Safari/537.36
Browser:
Chrome 129
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
const
9824146.0 Ops/sec
let
9965352.0 Ops/sec
var
9778871.0 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())