<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><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> changed
              <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - ECMAScript 2016: %TypedArray%.prototype.includes implementation"
   href="https://bugs.webkit.org/show_bug.cgi?id=159385">bug 159385</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Attachment #282639 description</td>
           <td>Patch
           </td>
           <td>RFC Patch
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - ECMAScript 2016: %TypedArray%.prototype.includes implementation"
   href="https://bugs.webkit.org/show_bug.cgi?id=159385#c3">Comment # 3</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - ECMAScript 2016: %TypedArray%.prototype.includes implementation"
   href="https://bugs.webkit.org/show_bug.cgi?id=159385">bug 159385</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>Comment on <span class=""><a href="attachment.cgi?id=282639&amp;action=diff" name="attach_282639" title="RFC Patch">attachment 282639</a> <a href="attachment.cgi?id=282639&amp;action=edit" title="RFC Patch">[details]</a></span>
RFC Patch

This Patch contains the implementation of JavaScript version and also the C++ version. I've made a benchmark with this code:

let a = new Float64Array(100);

a.fill(1);

for (let i = 0; i &lt; 100000000; i++) {
   a.includes(0);
}

The idea is reproduce the worst case, since it is going to compare with all array elements. These are the configurations of runs:

----------C++ Implementation----------
Caios-MacBook-Pro:js-tests caiolima$ JSC_useJIT=false time run-jsc includes-benchmark.js 
Running 1 time(s): DYLD_FRAMEWORK_PATH=/Users/caiolima/open_projects/WebKit/WebKitBuild/Release /Users/caiolima/open_projects/WebKit/WebKitBuild/Release/jsc includes-benchmark.js
       16.36 real        16.04 user         0.16 sys
Caios-MacBook-Pro:js-tests caiolima$ JSC_useJIT=true time run-jsc includes-benchmark.js 
Running 1 time(s): DYLD_FRAMEWORK_PATH=/Users/caiolima/open_projects/WebKit/WebKitBuild/Release /Users/caiolima/open_projects/WebKit/WebKitBuild/Release/jsc includes-benchmark.js
       13.71 real        13.40 user         0.16 sys

----------JS Wraper Implementation----------
Caios-MacBook-Pro:js-tests caiolima$ JSC_useJIT=false time run-jsc includes-benchmark.js 
Running 1 time(s): DYLD_FRAMEWORK_PATH=/Users/caiolima/open_projects/WebKit/WebKitBuild/Release /Users/caiolima/open_projects/WebKit/WebKitBuild/Release/jsc includes-benchmark.js
      345.25 real       343.33 user         1.24 sys
Caios-MacBook-Pro:js-tests caiolima$ 
Caios-MacBook-Pro:js-tests caiolima$ JSC_useJIT=true time run-jsc includes-benchmark.js 
Running 1 time(s): DYLD_FRAMEWORK_PATH=/Users/caiolima/open_projects/WebKit/WebKitBuild/Release /Users/caiolima/open_projects/WebKit/WebKitBuild/Release/jsc includes-benchmark.js
       12.54 real        12.22 user         0.23 sys

What I think is the C++ implementation has better LLInt - JIT balance, since it performs well with and without JIT. However, When the javascript wrapper is JITed,it performs better than the C++ version JITed. What do you guys think about it. Also, I am open to new Benchmark ideas.</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>