RFR: 8342540: InterfaceCalls micro-benchmark gives misleading results [v2]

Aleksey Shipilev shade at openjdk.org
Mon Oct 21 09:46:39 UTC 2024


On Fri, 18 Oct 2024 16:21:39 GMT, Andrew Haley <aph at openjdk.org> wrote:

> I have no idea how often well-predicted megamorphic calls occur. I can speculate that the "typical" megamorphic case lies somewhere between these extremes, but that is all. It may well be that normal behaviour is chaotic, but I strongly suspect that the cases are unlikely to be equally probable, as they are here. So, it is possible that an utterly unpredictable access pattern is just as unrealistic as a perfectly predictable one.

Yeah, all right. We can have a test that brackets the real-world performance between "best" and "worst" cases.

If you want to make "best" and "worst" only differ in the actual payload, maybe we should compute both scrambled and non-scrambled indexes, feed both to `Blackhole`, and only then select the index based on `randomized`. This way we would always compute both indexes.

Also stats question: Do you know if scrambling actually produces the full period in requested `range`, and whether the frequency for individual cases is roughly the same? We kinda assume this xor-step is well distributed and has good enthropy in lower bits, but is it in practice?

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

PR Comment: https://git.openjdk.org/jdk/pull/21581#issuecomment-2426161090


More information about the hotspot-compiler-dev mailing list