Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
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
Test name
Executions per second
new and setPrototypeOf
2811235.5 Ops/sec
Reflect.construct
2154907.5 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()