RFR: 8303882: Refactor some iterators in jdk.compiler [v3]

Pavel Rappo prappo at openjdk.org
Mon Mar 13 10:27:24 UTC 2023


On Mon, 13 Mar 2023 09:55:02 GMT, Pavel Rappo <prappo at openjdk.org> wrote:

>> Please review this refactoring to iterators in jdk.compiler. The refactoring delegates more to collections framework, while retaining the performance characteristics of bespoke iterators. The refactoring also adds inline comments, `@Override` annotations, and fixes some trivial bugs (as can be seen in the added test, which is slightly augmented from that suggested by Jan Lahoda here https://github.com/openjdk/jdk/pull/12904#discussion_r1129777660).
>> 
>> I'll add a comment here once I have benchmarked the change formally.
>
> Pavel Rappo has updated the pull request incrementally with four additional commits since the last revision:
> 
>  - Merge remote-tracking branch 'myjdk/8303882' into 8303882
>  - Squeeze a few extra drops of perf
>  - Add a recursive test
>  - Try squeeze more performance

I've run a relevant performance test suit on this PR: the results were noisy and inconclusive. That said, there was no gross degradation. I think it's time to make a choice: either let this PR in or drop it because it has already burned too much review cycles.

>From my perspective, this PR improves code reuse while also retaining characteristics of the compound iterator: the iterator is still lazy with the minimum number of calls to constituent iterators.

-------------

PR: https://git.openjdk.org/jdk/pull/12949


More information about the compiler-dev mailing list