Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
reuse obj vs new obj
(version: 1)
Comparing performance of:
reuse vs new obj
Created:
4 months ago
by:
Guest
Jump to the latest result
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()
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
reuse
new obj
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
4 months ago
)
User agent:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36
Browser/OS:
Chrome 143 on Linux
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
reuse
30149.8 Ops/sec
new obj
28317.3 Ops/sec
Related benchmarks:
little test
Test values #3
for-in vs object.keys no cycle
for-in vs object.keys (fork)
for-in vs object.keys map
length = 0 vs reassignment
Lodash DifferenceWith vs Native with Object
test modify reference vs Object destructing
Tuple versus Object
Comments
Confirm delete:
Do you really want to delete benchmark?