Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
Reflect.construct vs new and setPrototypeOf
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Mobile Safari/537.36
Browser:
Chrome Mobile 131
Operating system:
Android
Device Platform:
Mobile
Date tested:
one year ago
Benchmark engine:
Benchmark.js
new and setPrototypeOf
2.8M/s
Reflect.construct
2.2M/s
View exact numbers
Test name
Executions per second
✓
new and setPrototypeOf
2,811,236 Ops/sec
Reflect.construct
2,154,908 Ops/sec
Script Preparation code:
function A() {} A.prototype.x = 10; function B() { const a = new A() Object.setPrototypeOf(a, B.prototype) } B.prototype.y = 11; function C() { const a = Reflect.construct(A, [], C) } C.prototype.z = 12;
Tests:
new and setPrototypeOf
new B()
Reflect.construct
new C()