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
Test name
Executions per second
const
12020142.0 Ops/sec
let
12026396.0 Ops/sec
var
11874492.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())