Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
tgross35 opened this issue Apr 5, 2024 · 1 comment
Open

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

tgross35 opened this issue Apr 5, 2024 · 1 comment
Labels
question Further information is requested

Comments

@tgross35
Copy link

tgross35 commented Apr 5, 2024

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.

@stencillogic
Copy link
Owner

stencillogic commented Apr 6, 2024

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.

@stencillogic stencillogic added the question Further information is requested label Apr 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants