[Webkit-unassigned] [Bug 175663] New: [JSC] Proxy is slower in 10 times than defineProperty with function

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Aug 17 01:50:22 PDT 2017


https://bugs.webkit.org/show_bug.cgi?id=175663

            Bug ID: 175663
           Summary: [JSC] Proxy is slower in 10 times than defineProperty
                    with function
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: gskachkov at gmail.com

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);
```

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170817/fcf59ab3/attachment.html>


More information about the webkit-unassigned mailing list