Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
reuse obj vs new obj
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/143.0.0.0 Safari/537.36
Browser:
Chrome 143
Operating system:
Linux
Device Platform:
Desktop
Date tested:
7 months ago
reuse
30K/s
new obj
28K/s
View exact numbers
Test name
Executions per second
✓
reuse
30,150 Ops/sec
new obj
28,317 Ops/sec
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
function a() { let arr = [] for(let i = 1000; i--;) arr.push(Object.values({a: i})) } let obj = {} function b() { let arr = [] for(let i = 1000; i--;) { obj.a = i arr.push(Object.values(obj)) } }
Tests:
reuse
b()
new obj
a()