<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Unite op_get_by_id_with_this with op_get_by_id"
   href="https://bugs.webkit.org/show_bug.cgi?id=162124#c15">Comment # 15</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Unite op_get_by_id_with_this with op_get_by_id"
   href="https://bugs.webkit.org/show_bug.cgi?id=162124">bug 162124</a>
              from <span class="vcard"><a class="email" href="mailto:ticaiolima&#64;gmail.com" title="Caio Lima &lt;ticaiolima&#64;gmail.com&gt;"> <span class="fn">Caio Lima</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=162124#c13">comment #13</a>)
<span class="quote">&gt; Comment on <span class=""><a href="attachment.cgi?id=289377&amp;action=diff" name="attach_289377" title="Patch">attachment 289377</a> <a href="attachment.cgi?id=289377&amp;action=edit" title="Patch">[details]</a></span>
&gt; Patch
&gt; 
&gt; View in context:
&gt; <a href="https://bugs.webkit.org/attachment.cgi?id=289377&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=289377&amp;action=review</a>
&gt; 
&gt; &gt; Source/JavaScriptCore/ChangeLog:11
&gt; &gt; +        This patch is merging the op_get_by_id_with_this with op_get_by_id and
&gt; &gt; +        this way we enable get_by_id optimizations such as Monomorphic/Polymorphic Inline
&gt; &gt; +        Cache on JIT layers for super member access. These optimizations is improving access
&gt; &gt; +        of super members in ~20%.
&gt; 
&gt; Fully unoptimized property access is 10X slower than fully optimized
&gt; property access. Therefore, it's surprising that this patch is not a bigger
&gt; win on super-get-by-id-with-this-monomorphic. It looks like
&gt; super-get-by-id-with-this-monomorphic is a getter/setter benchmark. Can you
&gt; verify that the FTL successfully inlines the getter and setter for value()?
&gt; Perhaps the win on this benchmark is not bigger because the benchmark
&gt; includes an intermediate &quot;calc&quot; function, which is pretty expensive. Can you
&gt; report the speedup on this benchmark if you remove the call to calc?</span >

Removed from benchmark setter, calc and ArrayAccess and got the following report:

super-get-by-id-with-this-monomorphic       16.7063+-1.1934     ^     10.8042+-0.4034        ^ definitely 1.5463x faster

The code running is:
```
class A {
    constructor(x) { this._value = x; }
    set value(x) { this._value = x; }
    get value() { return this._value; }
}
class B extends A {
    set value(x) { super.value = x; }
    get value() { return super.value; }
}

const bench = (init, num) =&gt; {
    let arr = [];

    let sum = 0;
    for (let i = 0; i != num; ++i){ 
        let o = new B(init);
        sum += o.value;
    }
};

bench(2, 10000);
bench(1 &lt;&lt; 30, 10000);
bench(42.2, 10000);
bench(42.5e10, 10000);
```

I was expecting improvements on getter access cases. When they are inlined, it still calls the getter function, so I suppose the speedup is not in the same order of magnitude of non-getter properties, that is just an ```move``` using the property offset.

I thought 20% was good, because I was using  L. Peter Deutsch and Allan M. Schiffman's work as sand line (&quot;Efficient implementation of the smalltalk-80 system&quot;). On their paper, they reported that &quot;SOAR (a Smalltalk implementation for a RISC processor) would have been 33% slower without inline caching&quot; on page 14. Do you have any reference that evaluates speedups on x86_64 arch?

Also, What do you think about ~50% speedup?</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>