Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
proxy access vs function access
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/134.0.0.0 Safari/537.36
Browser:
Chrome 134
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
baseline property access
25015188.0 Ops/sec
function access
21919496.0 Ops/sec
proxy access
12723785.0 Ops/sec
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
function useTest() { const obj = { a: 'something' } const proxy = new Proxy(obj, { get(target, key) { return target[key] } }) function getA() { return obj.a } return { obj, proxy, getA } }
Tests:
baseline property access
const {obj} = useTest() const a = obj.a
function access
const {getA} = useTest() const a =getA()
proxy access
const {proxy} = useTest() const a = proxy.a