stencillogic/astro-float

Store the mantissa as a `Box<[Word]>` rather than a vector

tgross35 opened this issue · 1 comments

Is there ever a need to resize the mantissa vector? A possible optimization could be to store Box<[Word]> rather than Vec<Word>, which reduces the size of BigFloat from 40 bytes to 32.

There is a need to resize mantissa when result must have all bits of mantissa meaningful, e.g. to cover accumulating error.
In theory using this optimization could be beneficial. Previous versions of the library used smallvec, but tests have shown that it is not faster than usual std vec. Example when it really faster would be helpful.