[Dlang-internal] I need cent and ucent to be implemented soon

Saurabh Das saurabh.das at gmail.com
Thu Apr 29 04:43:44 UTC 2021


On Sunday, 18 April 2021 at 23:31:12 UTC, Elmar wrote:
> The only reason I see for not implementing it is low priority 
> and calculation with reals is sufficient in most cases and 
> faster (at least the register pressure will go down 
> significantly). The only disadvantage of reals is the limited 
> precision but except for extremely high precision applications 
> and cryptographic-related things, I don't know a need for 
> 128-bit (at least there is only few performance gain of using 
> 128-bit for parallel operations). Oftentimes you can replace 
> 128-bit arithmetics in cryptographic and multimedia with SIMD 
> instructions which are used for parallel arithmetics in 
> processors.

One big use case for 128-bit integers is working with 
cryptocurrencies. These do not fit into long/ulong if any 
multiplication is performed. D is very well suited to capturing 
this niche. A D implementation of cent/ucent would make it much 
more approachable.



More information about the Dlang-internal mailing list