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:
7 months ago
by:
Guest
Go 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:
7 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
instance
44.0M/s
object
42.5M/s
View exact numbers
Test name
Executions per second
✓
instance
44,004,608 Ops/sec
object
42,549,392 Ops/sec
Related benchmarks
Object.create vs {}
instanceof vs null
InstanceOf vs flag
instanceof vs number
{} vs new Object() vs Object.null (Generation)
Comments
Confirm delete:
Do you really want to delete benchmark?