<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - STP TypedArray.subarray 5x slowdown compared to 9.1"
   href="https://bugs.webkit.org/show_bug.cgi?id=156404#c4">Comment # 4</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - STP TypedArray.subarray 5x slowdown compared to 9.1"
   href="https://bugs.webkit.org/show_bug.cgi?id=156404">bug 156404</a>
              from <span class="vcard"><a class="email" href="mailto:keith_miller&#64;apple.com" title="Keith Miller &lt;keith_miller&#64;apple.com&gt;"> <span class="fn">Keith Miller</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=156404#c3">comment #3</a>)
<span class="quote">&gt; (In reply to <a href="show_bug.cgi?id=156404#c2">comment #2</a>)
&gt; &gt; (In reply to <a href="show_bug.cgi?id=156404#c1">comment #1</a>)
&gt; &gt; &gt; Fascinating.  That's a pretty serious regression.  Keith, do you remember
&gt; &gt; &gt; what we've done with subarray?
&gt; &gt; &gt; 
&gt; &gt; 
&gt; &gt; This regression is not particularly surprising. The ES6 spec changes the
&gt; &gt; behavior of the subarray function substantially. I expect that issue here is
&gt; &gt; that the subarray function now uses species constructors, which require
&gt; &gt; several property lookups. Namely, the constructor and the Symbol.species
&gt; &gt; properties. Since the subarray function is in C++ (where we don't cache the
&gt; &gt; property lookups) and the subarrays you are making are very small (4
&gt; &gt; elements). The cost of the species construction will dominate the cost of
&gt; &gt; the element copying.
&gt; 
&gt; Why not perform the property accesses in JavaScript and then call a helper
&gt; function to do the allocation?
&gt; 
&gt; I don't think we want to consider a 5X regression unsurprising.</span >

I agree, unsurprising was the wrong word choice. I think the a JS wrapper would work. I just didn't bother implementing it as I was unsure how popular the subarray function was in practice. If the subarray function is popular then creating a wrapper is something we should consider doing.</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>