<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - [JSC] implement async functions proposal"
   href="https://bugs.webkit.org/show_bug.cgi?id=156147#c110">Comment # 110</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - [JSC] implement async functions proposal"
   href="https://bugs.webkit.org/show_bug.cgi?id=156147">bug 156147</a>
              from <span class="vcard"><a class="email" href="mailto:sbarati&#64;apple.com" title="Saam Barati &lt;sbarati&#64;apple.com&gt;"> <span class="fn">Saam Barati</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=156147#c109">comment #109</a>)
<span class="quote">&gt; Comment on <span class=""><a href="attachment.cgi?id=280020&amp;action=diff" name="attach_280020" title="Patch">attachment 280020</a> <a href="attachment.cgi?id=280020&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=280020&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=280020&amp;action=review</a>
&gt; 
&gt; &gt;&gt; Source/JavaScriptCore/parser/Parser.cpp:624
&gt; &gt;&gt; +        if (UNLIKELY(m_runtimeFlags.isAsyncAwaitEnabled() &amp;&amp; matchContextualKeyword(m_vm-&gt;propertyNames-&gt;async))) {
&gt; &gt; 
&gt; &gt; There is a chance that this may be faster if the LHS and RHS were swapped because it might aid the register allocator. 
&gt; &gt; Same with the similar compare elsewhere.
&gt; &gt; Is this what's slowing down the parser?
&gt; &gt; Have you tried making ASYNC a key word? That may be faster than checking the IDENT's StringImpl
&gt; 
&gt; When executing `matchContextualKeyword(m_vm-&gt;propertyNames-&gt;async)`, it
&gt; becomes `Identifier == Identifier` check and it should be pointer comparison
&gt; because Identifier is already interned.</span >

I was just thinking that we may get almost identical codegen (or we would get slightly worse codegen but the machine's branch/indirect jump prediction would make up for it) for the 'switch' statement if we made ASYNC a keyword, and we wouldn't have this branch at each IDENT. But maybe this would cause slow downs elsewhere. I'm not sure. It's hard to predict without implementing it and measuring perf.</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>