Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Nested with statements
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36
Browser:
Chrome 134
Operating system:
Linux
Device Platform:
Desktop
Date tested:
one year ago
Normal
88.9M/s
1 with statement
4.0M/s
2 with statements
2.4M/s
3 with statements
1.6M/s
4 with statements
1.2M/s
View exact numbers
Test name
Executions per second
✓
Normal
88,875,592 Ops/sec
1 with statement
3,980,551 Ops/sec
2 with statements
2,356,184 Ops/sec
3 with statements
1,562,564 Ops/sec
4 with statements
1,176,462 Ops/sec
Script Preparation code:
let smthg = {abc:123} let myObj = {property: 1000} myObj.myObj = myObj for(let i = 5; i--;) window[`go${i}`] = Function(`with(myObj)`.repeat(i)+`{vari = 456; smthg = 789}`)
Tests:
Normal
go0()
1 with statement
go1()
2 with statements
go2()
3 with statements
go3()
4 with statements
go4()