[PATCH] 8217561 : X86: Add floating-point Math.min/max intrinsics, approval request

Andrew Haley aph at redhat.com
Mon Feb 25 18:42:29 UTC 2019

On 2/25/19 4:09 PM, B. Blaser wrote:
> Here it is:
> http://cr.openjdk.java.net/~bsrbnd/jdk8217561/webrev.05/
> I've just added the interesting use-case of inserting elements in a search tree.
> The insertion is absolutely unpredictable with random elements whereas
> fully predictable with sorted elements.
> Benchmarking this example is hard as it'd compute the average
> insertion time in a search tree which highly depends on its
> topography.
> That's why I decided to add it to the test-case doing some manual
> measurement using 'System.nanoTime()'.
> This experiment revealed at no surprise that the intrinsic is really
> worth being used only in the non-predictable case which the heuristic
> is for.
> Any Reviewer feedback and hopefully approval would be welcome
> (hotspot:tier1 is still OK on x86_64 xeon)!

6612 #ifdef AMD64

Why? It's the same for every out-of-order processor with speculation.

And the code *really* needs a comment to say what you're doing.

Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671

More information about the hotspot-compiler-dev mailing list