<div dir="ltr">Looks good to me, but I'm not a compiler engineer.</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 10, 2018 at 4:38 PM, Ivan Gerasimov <span dir="ltr"><<a href="mailto:ivan.gerasimov@oracle.com" target="_blank">ivan.gerasimov@oracle.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <p>Thank you Martin!<br>
    </p><span class="">
    <br>
    <div class="m_4305879139772753167moz-cite-prefix">On 7/10/18 2:32 PM, Martin Buchholz
      wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">I'm happy to see ArrayDeque replacing uses of
        ArrayList.
        <div><br>
        </div>
        <div>
          <pre style="color:rgb(0,0,0);text-decoration-style:initial;text-decoration-color:initial"><span class="m_4305879139772753167gmail-changed" style="color:blue">private final Map<List<String>, Deque<ReusableContext>> options2Contexts = new HashMap<>();</span>
</pre>
          <pre style="color:rgb(0,0,0);text-decoration-style:initial;text-decoration-color:initial"></pre>
          Looks like these Deques are used only via the Queue interface.
          I would either switch to Queue or to ArrayDeque (which might
          help the VM optimize).</div>
      </div>
    </blockquote>
    <br></span>
    Right.<br>
    I can't remember why I used Deque in one place and Queue in the
    other.<br>
    <br>
    Please find the updated webrev here:<br>
    <a class="m_4305879139772753167moz-txt-link-freetext" href="http://cr.openjdk.java.net/~igerasim/8206122/01/webrev/" target="_blank">http://cr.openjdk.java.net/~<wbr>igerasim/8206122/01/webrev/</a><br>
    <br>
    With kind regards,<br>
    Ivan<span class=""><br>
    <br>
    <blockquote type="cite">
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Tue, Jul 10, 2018 at 1:54 PM, Ivan
          Gerasimov <span dir="ltr"><<a href="mailto:ivan.gerasimov@oracle.com" target="_blank">ivan.gerasimov@oracle.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello!<br>
            <br>
            It is a tiny optimization.<br>
            <br>
            There are a couple of places where ArrayList is used as
            FIFO: elements are appended to the end, and removed from the
            head.<br>
            <br>
            ArrayDeque would be more efficient to use.<br>
            <br>
            Would you please help review?<br>
            <br>
            BUG: <a href="https://bugs.openjdk.java.net/browse/JDK-8206122" rel="noreferrer" target="_blank">https://bugs.openjdk.java.net/<wbr>browse/JDK-8206122</a><br>
            <br>
            Webrev: <a href="http://cr.openjdk.java.net/%7Eigerasim/8206122/00/webrev/" rel="noreferrer" target="_blank">http://cr.openjdk.java.net/~ig<wbr>erasim/8206122/00/webrev/</a><br>
            <br>
            Thanks in advance!<span class="m_4305879139772753167HOEnZb"><font color="#888888"><br>
                <br>
                -- <br>
                With kind regards,<br>
                Ivan Gerasimov<br>
                <br>
              </font></span></blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
    <pre class="m_4305879139772753167moz-signature" cols="72">-- 
With kind regards,
Ivan Gerasimov</pre>
  </span></div>

</blockquote></div><br></div>