<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
    Hi Christoph,<br>
    <br>
    I'm on the fence with this one. The improvements doesn't seems to be
    considerable, while some could see the rewriting as step back given
    that, again could be subjective, the code could be seen as more
    readable using Streams. We have seen great performance improvements
    overtime in new features like lambdas etc. I can certainly expect
    this to happen to streams too. So I don't see the same benefit here
    as in your other PR, the Pretty.java one. But others in the list
    could have another opinion,<br>
    <br>
    Thanks,<br>
    Vicente<br>
    <br>
    <div class="moz-cite-prefix">On 2/22/23 06:46,
      <a class="moz-txt-link-abbreviated" href="mailto:christoph.dreis@freenet.de">christoph.dreis@freenet.de</a> wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:PAXP193MB12314C4F9E105818BE3ED543AFAA9@PAXP193MB1231.EURP193.PROD.OUTLOOK.COM">
      
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <style>@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:12.0pt;
        font-family:"Calibri",sans-serif;
        mso-ligatures:standardcontextual;
        mso-fareast-language:EN-US;}a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}code
        {mso-style-priority:99;
        font-family:"Courier New";}p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        font-size:12.0pt;
        font-family:"Calibri",sans-serif;
        mso-ligatures:standardcontextual;
        mso-fareast-language:EN-US;}span.E-MailFormatvorlage21
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}div.WordSection1
        {page:WordSection1;}ol
        {margin-bottom:0cm;}ul
        {margin-bottom:0cm;}</style>
      <div class="WordSection1">
        <p class="MsoNormal"><span style="font-size:11.0pt">Hi Vicente,<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt" lang="EN-US">thanks
            for taking the time. I’ve added a comment in the PR with
            screenshots from async-profiler runs etc. that are somewhat
            easier to post there compared to the mailing list. But to
            share the TL;DR:<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt" lang="EN-US"><o:p> </o:p></span></p>
        <ul style="margin-top:0cm" type="disc">
          <li class="MsoListParagraph" style="margin-left:0cm;mso-list:l0 level1 lfo2"><span style="font-size:11.0pt" lang="EN-US">~2500 classes<o:p></o:p></span></li>
          <li class="MsoListParagraph" style="margin-left:0cm;mso-list:l0 level1 lfo2"><span style="font-size:11.0pt" lang="EN-US">Average size: ~76
              lines<o:p></o:p></span></li>
          <li class="MsoListParagraph" style="margin-left:0cm;mso-list:l0 level1 lfo2"><span style="font-size:11.0pt" lang="EN-US">Largest class: ~2500
              lines<o:p></o:p></span></li>
          <li class="MsoListParagraph" style="margin-left:0cm;mso-list:l0 level1 lfo2"><span style="font-size:11.0pt" lang="EN-US">Mostly hand-written,
              but some auto-generated protobuf files (I'd say 90/10
              split)<o:p></o:p></span></li>
        </ul>
        <p class="MsoNormal"><span style="font-size:11.0pt" lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt" lang="EN-US">Overall
            timings didn’t improve (or regress), but the allocations of
            Symtab.lookupPackage() went down from 1.6% to 0.1% overall,
            while CPU frames went down from 1.6% to 0.9%.<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt" lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt" lang="EN-US">Let
            me know if you need more information and I’ll post this to
            the issue on GitHub.<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt" lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt" lang="EN-US">Cheers,<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt" lang="EN-US">Christoph<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt" lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt" lang="EN-US"><o:p> </o:p></span></p>
        <div>
          <p class="MsoNormal" style="margin-left:35.4pt">Am 22.02.23,
            04:16 schrieb "Vicente Romero"
            <a class="moz-txt-link-rfc2396E" href="mailto:vicente.romero@oracle.com"><vicente.romero@oracle.com></a>:<span style="font-size:11.0pt;mso-ligatures:none;mso-fareast-language:DE"><o:p></o:p></span></p>
        </div>
        <p class="MsoNormal" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:35.4pt"><br>
          Hi Christoph,<br>
          <br>
          Could you please share more info like what type of sources are
          you compiling: machine generated or not, very long sources,
          etc. Also what's the performance improvement you get with your
          patch, etc.<br>
          <br>
          Thanks,<br>
          Vicente<o:p></o:p></p>
        <div>
          <p class="MsoNormal" style="margin-left:35.4pt">On 2/21/23
            16:03, <a href="mailto:christoph.dreis@freenet.de" moz-do-not-send="true" class="moz-txt-link-freetext">
              christoph.dreis@freenet.de</a> wrote:<o:p></o:p></p>
        </div>
        <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
          <p style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:35.4pt;background:white"><span style="color:#24292F" lang="EN-US">Hi,</span><o:p></o:p></p>
          <p style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:35.4pt;background:white;box-sizing:
            border-box;font-variant-ligatures: normal;font-variant-caps:
            normal;orphans: 2;text-align:start;widows:
            2;-webkit-text-stroke-width: 0px;text-decoration-thickness:
            initial;text-decoration-style:
            initial;text-decoration-color: initial;word-spacing:0px">
            <span style="color:#24292F" lang="EN-US">I'm currently
              profiling some compilation phases of internal projects and
              noticed in allocation profiles that </span><code><span style="font-size:10.0pt;font-family:"Calibri",sans-serif;color:#24292F" lang="EN-US">Symtab.lookupPackage</span></code><span style="color:#24292F" lang="EN-US"> takes up ~2% overall.
              The majority of this is spent in </span><code><span style="font-size:10.0pt;font-family:"Calibri",sans-serif;color:#24292F" lang="EN-US">.stream().anyMatch()</span></code><span style="color:#24292F" lang="EN-US"> usages to find out if
              the given module symbol depends on the unnamed module.</span><o:p></o:p></p>
          <p style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:35.4pt;background:white"><span style="color:#24292F" lang="EN-US"> </span><o:p></o:p></p>
          <p style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:35.4pt;background:white"><span style="color:#24292F" lang="EN-US">The PR under <a href="https://urldefense.com/v3/__https://github.com/openjdk/jdk/pull/12700__;!!ACWV5N9M2RV99hQ!IIXyUx5ZjLrx7hFkIokefPwtWpLqF1uyRI7MXKKY1m72UryCkRemnzgHLC2txnHo3SZFHozLPgWBvjDFql3VAAz88x1M6lU4$" moz-do-not-send="true">
                https://github.com/openjdk/jdk/pull/12700</a> desugars
              the code into a simple loop.</span><o:p></o:p></p>
          <p style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:35.4pt;background:white;box-sizing:
            border-box;font-variant-ligatures: normal;font-variant-caps:
            normal;orphans: 2;text-align:start;widows:
            2;-webkit-text-stroke-width: 0px;text-decoration-thickness:
            initial;text-decoration-style:
            initial;text-decoration-color: initial;word-spacing:0px">
            <span style="color:#24292F" lang="EN-US">If you think this
              is worthwhile I'd appreciate if this is sponsored. I'd
              also need a ticket number for that because I can't create
              tickets.
            </span><span style="color:#24292F">CLA should be signed
              though.</span><o:p></o:p></p>
          <p style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:35.4pt;background:white"><span style="color:#24292F;background:white" lang="EN-US">Let me
              know what you think.</span><span style="color:#24292F" lang="EN-US"><br>
            </span><span style="color:#24292F;background:white">Cheers,</span><span style="color:#24292F"><br>
              <span style="background:white">Christoph</span></span><o:p></o:p></p>
          <p style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:35.4pt;background:white"><span style="font-size:10.5pt;color:black" lang="EN-US"> </span><o:p></o:p></p>
          <p class="MsoNormal" style="margin-left:35.4pt"><span style="font-size:11.0pt" lang="EN-US"> </span><o:p></o:p></p>
          <p class="MsoNormal" style="margin-left:35.4pt"><span style="font-size:11.0pt" lang="EN-US"> </span><o:p></o:p></p>
        </blockquote>
        <p class="MsoNormal" style="margin-left:35.4pt"><span style="font-size:11.0pt;mso-ligatures:none;mso-fareast-language:DE"><o:p> </o:p></span></p>
      </div>
    </blockquote>
    <br>
  </body>
</html>