April 11, 2022

On Monday, 11 April 2022 at 07:24:41 UTC, Ola Fosheim Grøstad wrote:

>

On Friday, 1 April 2022 at 12:06:01 UTC, deadalnix wrote:

>

This is why a 128 bit type is absolutely key, it unlocks the ability to write larger integer types in a way that will allow the compiler to generate good code for it.

Does LLVM support that width good code gen? Intel/AMD have some instructions intended for higher precision math (ADX, MULX). They also have some instructions meant to be used for crypto, e.g. CLMUL.

LLVM 128 type (named i128) on x86_64 produces standard instructions, e.g more or less the D library implementation with better code gen, example.

April 11, 2022

On Monday, 11 April 2022 at 07:44:04 UTC, user1234 wrote:

>

On Monday, 11 April 2022 at 07:24:41 UTC, Ola Fosheim Grøstad wrote:

>

Intel/AMD have some instructions intended for higher precision math (ADX, MULX). They also have some instructions meant to be used for crypto, e.g. CLMUL.

LLVM 128 type (named i128) on x86_64 produces standard instructions, e.g more or less the D library implementation with better code gen, example.

Thanks, it appears to use "MULX" if you specify the compiler option -mattr=bmi2 or a -mcpu=haswell.

April 11, 2022

On Monday, 11 April 2022 at 08:15:09 UTC, Ola Fosheim Grøstad wrote:

>

On Monday, 11 April 2022 at 07:44:04 UTC, user1234 wrote:

>

On Monday, 11 April 2022 at 07:24:41 UTC, Ola Fosheim Grøstad wrote:

>

Intel/AMD have some instructions intended for higher precision math (ADX, MULX). They also have some instructions meant to be used for crypto, e.g. CLMUL.

LLVM 128 type (named i128) on x86_64 produces standard instructions, e.g more or less the D library implementation with better code gen, example.

Thanks, it appears to use "MULX" if you specify the compiler option -mattr=bmi2 or a -mcpu=haswell.

Actually, as said in the beginning of the thread I expect that eventually LDC developers will patch their fork of the D runtime, assuming i128 has the same ABI as the structure used in D... although the D implementation must still be there in some way for CTFE.

February 21, 2023
On Saturday, 2 April 2022 at 22:41:52 UTC, Walter Bright wrote:
> On 4/1/2022 7:23 AM, mee6 wrote:
>>> Whoever does it first gets the glory :-)
>> 
>> I'd do it for money lol
>
> What the hell, I'm tired of the jawboning and did it for the greater glory:
>
> https://github.com/dlang/phobos/pull/8426

Thank you for your work, I'm very happy and thankful.

I will try to add it to my decimal calculator module now.
1 2 3 4 5 6 7 8
Next ›   Last »