Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
object vs new instance
(version: 1)
Comparing performance of:
instance vs object
Created:
4 months ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
class Class{a = 0; b = 1; c = 2;}
Tests:
instance
const instance = new Class();
object
const object = {a:0, b:1, c:2,}
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
instance
object
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
4 months ago
)
User agent:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Mobile Safari/537.36
Browser/OS:
Chrome Mobile 143 on Android
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
instance
44004608.0 Ops/sec
object
42549392.0 Ops/sec
Related benchmarks:
Thingie
object create vs others
Create object
Object.create vs {}
Object assign vs empty obj
instanceof vs null
Object.create(null) vs Object literal
InstanceOf vs flag
instanceof vs number
{} vs new Object() vs Object.null (Generation)
Comments
Confirm delete:
Do you really want to delete benchmark?