RFR: 8319822: Use a linear-time algorithm for assert_different_registers() [v3]

Andrew Haley aph at openjdk.org
Tue May 28 15:57:19 UTC 2024


On Mon, 27 Nov 2023 10:43:30 GMT, Andrew Haley <aph at openjdk.org> wrote:

> > > I started to review the patch and was wondering if this could be simplify to something like this?: [stefank at f38c791](https://github.com/stefank/jdk/commit/f38c791793440b899ce6c4c9723470a5d4b18050)
> > 
> > 
> > Sure, it could be done. This is a minor efficiency tweak.
> 
> It tested the build performance before this PR, with the patch in this PR, and my simplified version. I can't see any performance difference on my MacBook M1. Is there any platform where this makes a bigger difference?
> 
> Edit: I realize that since this doesn't always boil down to a constexpr, then the run time might be more interesting than the build time.

You won't see very much, if any, because other things dominate. The main advantage, going forward, is that much of this can be constexpr'd, once I find out how to test on Windows.

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

PR Comment: https://git.openjdk.org/jdk/pull/16617#issuecomment-2135594254


More information about the hotspot-compiler-dev mailing list