<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:mark.lam&#64;apple.com" title="Mark Lam &lt;mark.lam&#64;apple.com&gt;"> <span class="fn">Mark Lam</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - JavaScriptCore performance is very bad on Windows"
   href="https://bugs.webkit.org/show_bug.cgi?id=146448">bug 146448</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 #256896 Flags</td>
           <td>review?
           </td>
           <td>review-
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - JavaScriptCore performance is very bad on Windows"
   href="https://bugs.webkit.org/show_bug.cgi?id=146448#c26">Comment # 26</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - JavaScriptCore performance is very bad on Windows"
   href="https://bugs.webkit.org/show_bug.cgi?id=146448">bug 146448</a>
              from <span class="vcard"><a class="email" href="mailto:mark.lam&#64;apple.com" title="Mark Lam &lt;mark.lam&#64;apple.com&gt;"> <span class="fn">Mark Lam</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=256896&amp;action=diff" name="attach_256896" title="Patch">attachment 256896</a> <a href="attachment.cgi?id=256896&amp;action=edit" title="Patch">[details]</a></span>
Patch

View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=256896&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=256896&amp;action=review</a>

Per, there are 2 changes here:
1. Replacing use of std::thread::id with WTF::ThreadIdentifier.
2. Optimizing out the computation of stack bounds when still in the same Windows fiber.

Can you (or someone) please confirm that (1) actually contributes to the performance difference you’re seeing?  These 2 changes should be tested separately to measure their effects.

<span class="quote">&gt; Source/JavaScriptCore/runtime/JSLock.cpp:121
&gt; +        m_ownerThreadID = WTF::currentThread();</span >

No need to use the WTF::.  The convention for WTF APIs is that their header files already provide &quot;using” declarations.  We can just use an unqualified currentThread() here.

<span class="quote">&gt; Source/JavaScriptCore/runtime/JSLock.cpp:200
&gt; +    ASSERT(!m_hasExclusiveThread || (exclusiveThread() == WTF::currentThread()));</span >

Ditto.  No need for WTF:: qualifier.

<span class="quote">&gt; Source/JavaScriptCore/runtime/JSLock.cpp:203
&gt; +    return m_ownerThreadID == WTF::currentThread();</span >

Ditto.

<span class="quote">&gt; Source/JavaScriptCore/runtime/JSLock.cpp:210
&gt; +        ASSERT(exclusiveThread() == WTF::currentThread());</span >

Ditto.

<span class="quote">&gt; Source/WebCore/bindings/js/JSDOMWindowBase.cpp:206
&gt; +        vm-&gt;setExclusiveThread(WTF::currentThread());</span >

Ditto.  No need to WTF:: qualifier.</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>