RESOLVED DUPLICATE of bug 252229175663
[JSC] Proxy is slower in 10 times than defineProperty with function
https://bugs.webkit.org/show_bug.cgi?id=175663
Summary [JSC] Proxy is slower in 10 times than defineProperty with function
GSkachkov
Reported 2017-08-17 01:50:22 PDT
Proxy is slower in 10 times than defineProperty with function, so I feel there is a space for improvements: https://esbench.com/bench/5995518299634800a0348df3 Proxy ``` var p = new Proxy({}, { get: function(target, prop, receiver) { return 10; } }); var result = 0; for (var i =0; i< 100000; i++){ result = result + p.a; } console.log(result); ``` ``` var p = {}; Object.defineProperty(p, 'a', { get: function(x) { return 10; } }); var result = 0; for (var i = 0; i< 100000; i++){ result = result + p.a; } console.log(result); ```
Attachments
GSkachkov
Comment 1 2017-08-17 01:52:21 PDT
I think we need to start from good benchmark tests, I'll check what part of the Proxy is covered by ES6 Benchmark test
GSkachkov
Comment 2 2017-08-17 07:37:57 PDT
There is a small discussion on esdiscuss.org: https://esdiscuss.org/topic/proxy-performance-jit-compilation
Alexey Shvayka
Comment 3 2023-09-15 00:12:32 PDT
Performance of Proxy [[Get]] was significantly increased by https://commits.webkit.org/260282@main and a few follow-ups. *** This bug has been marked as a duplicate of bug 252229 ***
Note You need to log in before you can comment on or make changes to this bug.