[rust-dev] Appeal for CORRECT, capable, future-proof math, pre-1.0

Corey Richardson corey at octayn.net
Fri Jan 10 22:27:26 PST 2014


Simple answer: then it shouldn't be our default numeric type. You say
earlier that we don't need a default, and that is a case I hadn't
considered before. But I'm growing to like it.

On Sat, Jan 11, 2014 at 1:23 AM, Daniel Micay <danielmicay at gmail.com> wrote:
> On Sat, Jan 11, 2014 at 12:41 AM, Corey Richardson <corey at octayn.net> wrote:
>>
>> We need to perform at least as well as GMP for me to even consider it.
>
> The only realistic way to accomplish this is using GMP. Lots of other
> big integer implementations exist with lots of work put into them and
> the performance is not even in the same ballpark. It's difficult just
> to implement all of the required algorithms:
>
> https://gmplib.org/manual/Division-Algorithms.html#Division-Algorithms
>
> Then, consider that you're going to need to write the low-level code
> by hand in assembly so you're going to need domain experts for several
> architectures. Processors and compilers are terrible at dealing with
> the side effects like carry/overflow flags and can't deal with this
> kind of code well.
>
> You'll need versions for different revisions of the CPU instruction
> set too, since useful features are added all of the time. For example,
> Haswell introduces the `MULX` instruction (among others) and Broadwell
> will introduce `ADCX` and `ADOX`.


More information about the Rust-dev mailing list