RFR: 8238669: Long.divideUnsigned is extremely slow for certain values (Needs to be Intrinsic)

Brian Burkhalter brian.burkhalter at oracle.com
Wed Sep 2 14:25:39 UTC 2020


Hi Raffaello,

I can take a look. Did you write any (JMH?) microbenchmarks?

Thanks,

Brian

> On Sep 2, 2020, at 5:52 AM, Raffaello Giulietti <raffaello.giulietti at gmail.com> wrote:
> 
> here's a patch for [1], which is currently unassigned. Anybody willing to sponsor it?
> 
> The fix is based on "Hacker's Delight" (2nd ed), section 9.3 and makes use of longs only, no BigInteger, no garbage to collect. It is faster and "greener" than the current code.
> 
> Contrary to the dramatic plea in the subject, with this fix I think there's no pressing need for an intrinsic.
> 
> The fix should be back-portable to 11 and 8, where the methods first appeared, but I only tried on a current changeset [2].
> 
> Passes tier1.
> 
> If anybody needs the fix as attachment, just let me know.



More information about the core-libs-dev mailing list