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

Optimize div operation #52

Closed
paupino opened this issue Oct 10, 2017 · 3 comments
Closed

Optimize div operation #52

paupino opened this issue Oct 10, 2017 · 3 comments

Comments

@paupino
Copy link
Owner

paupino commented Oct 10, 2017

The current implementation of div focused on correctness over performance therefore can use some optimization.

Current benchmarks on 2.3GHz i7, 16GB DDR3, macOS High Sierra:

test bench_decimal_div ... bench:  47,344,736 ns/iter (+/- 6,536,510)
@paupino
Copy link
Owner Author

paupino commented Nov 8, 2017

Will try to reduce dependency on BigInt's etc across rescale and round_dp during this.

@paupino
Copy link
Owner Author

paupino commented Nov 10, 2017

New numbers:

test bench_decimal_div ... bench:   3,961,951 ns/iter (+/- 328,683)

@paupino
Copy link
Owner Author

paupino commented Dec 29, 2017

The changes from #95 are subtle on a like for like comparison, but still regularly faster:

test bench_decimal_div ... bench:   3,349,243 ns/iter (+/- 131,503)

@paupino paupino closed this as completed Aug 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant