<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - GetByIdWithThis/GetByValWithThis should be faster when monomorphic than when polymorphic"
   href="https://bugs.webkit.org/show_bug.cgi?id=161741">161741</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>GetByIdWithThis/GetByValWithThis should be faster when monomorphic than when polymorphic
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>WebKit Nightly Build
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>JavaScriptCore
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>jfbastien&#64;apple.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Follow-up to <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - GetByIdWithThis/GetByValWithThis should have ValueProfiles so that they can predict their result types"
   href="show_bug.cgi?id=160922">https://bugs.webkit.org/show_bug.cgi?id=160922</a>

The above patch added value profiling to the two opcodes, they got faster, but the new tests have odd behavior:


$ ./Tools/Scripts/run-jsc-benchmarks old:./before/bin/jsc new:./current/bin/jsc --benchmarks &quot;super-get-by-&quot; --microbenchmarks --outer 400

                                                   old                       new                                        

super-get-by-id-with-this-monomorphic        29.3852+-0.2030     ^     27.1366+-0.1896        ^ definitely 1.0829x faster
super-get-by-id-with-this-polymorphic        27.0021+-0.2115     ^     25.6205+-0.1965        ^ definitely 1.0539x faster
super-get-by-val-with-this-monomorphic       29.8851+-0.1339     ^     28.9029+-0.1612        ^ definitely 1.0340x faster
super-get-by-val-with-this-polymorphic       27.6204+-0.1616     ?     27.8924+-0.2388        ?

&lt;geometric&gt;                                  28.4117+-0.0838     ^     27.3187+-0.0971        ^ definitely 1.0400x faster


I'd expect monomorphic to be faster than polymorphic, for both test, before as well as after the patch. The patch isn't a regression (poly was faster than mono before it), but we should investigate why this is happening. The difference seems to be that there were many more exits in mono than poly as shown by the profile from that patch:

  <a href="https://bugs.webkit.org/attachment.cgi?id=287636">https://bugs.webkit.org/attachment.cgi?id=287636</a></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>