Remove stream usage from Symtab.lookupPackage()

christoph.dreis at freenet.de christoph.dreis at freenet.de
Tue Feb 21 21:03:21 UTC 2023


Hi,

I'm currently profiling some compilation phases of internal projects and noticed in allocation profiles that Symtab.lookupPackage takes up ~2% overall. The majority of this is spent in .stream().anyMatch() usages to find out if the given module symbol depends on the unnamed module.



The PR under https://github.com/openjdk/jdk/pull/12700 desugars the code into a simple loop.

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. CLA should be signed though.

Let me know what you think.
Cheers,
Christoph




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/compiler-dev/attachments/20230221/1821a433/attachment.htm>


More information about the compiler-dev mailing list