Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
Proxy JS Get Benchmark Multiple InheritanceFix4
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36
Browser:
Chrome 126
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
2 years ago
Benchmark engine:
Benchmark.js
o1
28.6M/s
o2
28.6M/s
Proxy
7.9M/s
View exact numbers
Test name
Executions per second
✓
o1
28,607,128 Ops/sec
o2
28,576,956 Ops/sec
Proxy
7,876,963 Ops/sec
Script Preparation code:
function multiInherit (p1,p2) { return Object.create(new Proxy(Object.create(null), { get (target, prop, receiver) { return p1[prop] || p2[prop] } })); } var o1 = {value:1} var o2 = {value2:2} var obj = multiInherit(o1, o2);
Tests:
o1
o1.value;
o2
o2.value
Proxy
obj.value2