[Webkit-unassigned] [Bug 143239] No way to quickly make non-enumerable instance properties

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 30 16:21:07 PDT 2015


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

--- Comment #7 from Filip Pizlo <fpizlo at apple.com> ---
(In reply to comment #3)
> Accessing a property using symbol seems pretty fast
> (http://jsperf.com/symbol-vs-property/13):
> 
> symbol    18,871,149 ±0.94%  28% slower
> property  18,106,575 ±0.42%  31% slower
> .foo      26,093,814 ±0.53%  fastest
> 
> (Chrome results are somewhat misleading because it ran on a much faster
> results; what's important is the relative perf. of different cases).

No.  Relative perf doesn't matter.  It's possible that just adding a symbol-keyed property puts the prototype into a slower mode, in which case this test is bogus.

If Chrome is much faster on basic property accesses in your test then one of the following is happening:

- Our property accesses are completely busted and we should go back to the drawing board.  Unlikely, since we are very competitive on property access tests.

- Putting symbols into an object makes accesses to even normal properties slower, in which case "accessing a property using a symbol seems pretty fast" is an incorrect conclusion.

- jsperf puts each microbenchmark snippet into some kind of bizarro loop, and we're running that loop slowly.  I.e. you're not even testing property access performance but you're just testing the performance of the jsperf harness.

Anyway, it's completely wrong to conclude that something is fast the baseline (accessing .foo) is an order of magnitude slower than Chrome.

-- 
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/20150330/d91ff680/attachment-0002.html>


More information about the webkit-unassigned mailing list