Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
const vs let vs var vs sloppy
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Browser:
Chrome 120
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
2 years ago
Benchmark engine:
Benchmark.js
var
32.4M/s
let
7.8M/s
const
5.6M/s
sloppy
2.0M/s
View exact numbers
Test name
Executions per second
✓
var
32,421,064 Ops/sec
let
7,839,956 Ops/sec
const
5,611,410 Ops/sec
sloppy
2,033,091 Ops/sec
Tests:
var
var g = { e: [] } g.o = function(x) { g.e.push(...[1,2,3]) } g.o()
let
let g = { e: [] } g.o = function(x) { g.e.push(...[1,2,3]) } g.o()
const
const g = { e: [] } g.o = function(x) { g.e.push(...[1,2,3]) } g.o()
sloppy
g = { e: [] } g.o = function(x) { g.e.push(...[1,2,3]) } g.o()