RFR: JDK-8180450: secondary_super_cache does not scale well [v4]
Andrew Haley
aph at openjdk.org
Tue Mar 19 09:42:22 UTC 2024
On Tue, 19 Mar 2024 02:42:14 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:
> Thanks a lot for taking care of secondary supers redesign, Andrew!
My pleasure.
> Overall, I really like the balance you strike with the proposed approach. As I can see on the tests, it behaves very well for positive cases across the whole range of sizes (longest probe distance maxes at 4 on `org.openjdk.bench.vm.lang.IntfSubtype` microbenchmark). For negative cases it starts to quickly degrade after ~45 elements (I measured distance to the nearest zero in the bitmask) which looks like a good compromise for simplicity of hash function and single pass packing of the table.
Yes, exactly. it's not at all difficult to fix the negative case so that it performs much better with higher numbers of secondaries, but it seemed pointless.
> IMO it's important to cover reflection (non-constant) case and stubs.
We might find that hashed lookup in the non-constant case, with a small number of secondaries, doesn't look much better than a short linear search. But OK, I'll try in a later patch.
> Also, it would be nice to align the implementation across all execution modes. But it can be covered as follow-up enhancements.
Yes, especially because the great virtue of this patch is that it's stand alone, and it can very easily be back ported.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/18309#issuecomment-2006531309
More information about the hotspot-dev
mailing list