RFR: 8238669: Long.divideUnsigned is extremely slow for certain values (Needs to be Intrinsic)
Raffaello Giulietti
raffaello.giulietti at gmail.com
Wed Sep 2 21:26:07 UTC 2020
Hi Joe,
will do in the next days, hopefully before the transition to Skara.
I'll also add JMH results.
Greetings
Raffaello
On 2020-09-02 21:17, Joe Darcy wrote:
> Hello,
>
> I also suggest taking a look at the existing regression tests in
>
> test/jdk/java/lang/Long/Unsigned.java
>
> to see if more cases should be added with the new algorithm.
> Potentially, the existing algorithm could retire to serve as a reference
> in the regression tests.
>
> Thanks,
>
> -Joe
>
> On 9/2/2020 7:37 AM, Raffaello Giulietti wrote:
>> Hi Brian,
>>
>> thanks for taking a look.
>>
>> I didn't write JMH benchmarks.
>>
>>
>> Greetings
>> Raffaello
>>
>>
>>
>> On 2020-09-02 16:25, Brian Burkhalter wrote:
>>> 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
>>>> <mailto: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