Thread overview | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
May 04, 2019 I need cent and ucent to be implemented soon | ||||
---|---|---|---|---|
| ||||
Hi guys, I am writing a program what will use very big numbers, when will you guys implement cent and ucent? |
May 04, 2019 Re: I need cent and ucent to be implemented soon | ||||
---|---|---|---|---|
| ||||
Posted in reply to Murilo | On Saturday, 4 May 2019 at 04:28:55 UTC, Murilo wrote: > Hi guys, I am writing a program what will use very big numbers, when will you guys implement cent and ucent? Why BigInt doesn't fit? https://dlang.org/phobos/std_bigint.html |
May 04, 2019 Re: I need cent and ucent to be implemented soon | ||||
---|---|---|---|---|
| ||||
Posted in reply to Alex | On Saturday, 4 May 2019 at 11:03:59 UTC, Alex wrote:
> On Saturday, 4 May 2019 at 04:28:55 UTC, Murilo wrote:
>> Hi guys, I am writing a program what will use very big numbers, when will you guys implement cent and ucent?
>
> Why BigInt doesn't fit?
> https://dlang.org/phobos/std_bigint.html
128 bits int are supposed to be a fast, fixed size, standard integer type. BigInt is more designed for arbitrary length. Also GCC and LLVM-based backends could support them easily. DMD implementation would be more something like d templates funcs (since hooks are being left away) in druntime (likely in object.d) with asm inside...
|
May 04, 2019 Re: I need cent and ucent to be implemented soon | ||||
---|---|---|---|---|
| ||||
Posted in reply to user1234 | On Saturday, 4 May 2019 at 12:00:08 UTC, user1234 wrote:
> 128 bits int are supposed to be a fast, fixed size, standard integer type.
Hey, sorry for degrading this to a learn forum section and I promise I stop posting such silly questions here very soon. But just out of interest: Isn't this true, only in the case where such ints are native to the architecture? If so, and if you see a machine of such architecture in the wild, could you post a link here?
|
May 04, 2019 Re: I need cent and ucent to be implemented soon | ||||
---|---|---|---|---|
| ||||
Posted in reply to Alex | On Saturday, 4 May 2019 at 16:15:33 UTC, Alex wrote: > On Saturday, 4 May 2019 at 12:00:08 UTC, user1234 wrote: >> 128 bits int are supposed to be a fast, fixed size, standard integer type. > > Hey, sorry for degrading this to a learn forum section and I promise I stop posting such silly questions here very soon. Good initiative. > But just out of interest: Isn't this true, only in the case where such ints are native to the architecture? If so, and if you see a machine of such architecture in the wild, could you post a link here? SSE regs are wide enough... Also in a far past a similar situation existed with 64 bits int on x86 CPUs, were machine word was 32 bits. The int was either passed as a struct or split and passed in two regs and then some special intrinsic functions were used for the different ops. Technically nothing prevents to have them, it's just that someone has to do the work. There's a good pile of operation to implement: arithetic, bitwise... some stuff with the implicit conversions too, etc. As said with DMD this won't be as good as with other compilos which have intrinsics for all the ops (AFAIU). |
May 04, 2019 Re: I need cent and ucent to be implemented soon | ||||
---|---|---|---|---|
| ||||
Posted in reply to Alex | On Saturday, 4 May 2019 at 11:03:59 UTC, Alex wrote:
> On Saturday, 4 May 2019 at 04:28:55 UTC, Murilo wrote:
>> Hi guys, I am writing a program what will use very big numbers, when will you guys implement cent and ucent?
>
> Why BigInt doesn't fit?
> https://dlang.org/phobos/std_bigint.html
BigInt takes too long. I need something as fast as the primitive types.
|
September 18, 2019 Re: I need cent and ucent to be implemented soon | ||||
---|---|---|---|---|
| ||||
Posted in reply to Murilo | On Saturday, 4 May 2019 at 19:08:10 UTC, Murilo wrote:
> BigInt takes too long. I need something as fast as the primitive types.
What hardware are you planning on running your programs on? I'm not sure how good a speed you can guarantee without native hardware support.
|
September 27, 2019 Re: I need cent and ucent to be implemented soon | ||||
---|---|---|---|---|
| ||||
Posted in reply to Joseph Rushton Wakeling | On Wednesday, 18 September 2019 at 18:42:32 UTC, Joseph Rushton Wakeling wrote:
> On Saturday, 4 May 2019 at 19:08:10 UTC, Murilo wrote:
>> BigInt takes too long. I need something as fast as the primitive types.
>
> What hardware are you planning on running your programs on? I'm not sure how good a speed you can guarantee without native hardware support.
I have an AMD FX-4300 processor.
|
October 11, 2019 Re: I need cent and ucent to be implemented soon | ||||
---|---|---|---|---|
| ||||
Posted in reply to Murilo | On Saturday, 4 May 2019 at 04:28:55 UTC, Murilo wrote:
> Hi guys, I am writing a program what will use very big numbers, when will you guys implement cent and ucent?
Amaury / deadalnix said this would be one thing that might help the adoption of D for Bitcoin Cash,if I recall correctly. It wasn't the most important thing though.
|
October 11, 2019 Re: I need cent and ucent to be implemented soon | ||||
---|---|---|---|---|
| ||||
Posted in reply to Laeeth Isharc | On Friday, 11 October 2019 at 01:23:48 UTC, Laeeth Isharc wrote:
> On Saturday, 4 May 2019 at 04:28:55 UTC, Murilo wrote:
>> Hi guys, I am writing a program what will use very big numbers, when will you guys implement cent and ucent?
>
> Amaury / deadalnix said this would be one thing that might help the adoption of D for Bitcoin Cash,if I recall correctly. It wasn't the most important thing though.
Thanks.
|
Copyright © 1999-2021 by the D Language Foundation