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

Small performance optimization (perhaps for the next following release?) #23

Merged
merged 1 commit into from
Jun 7, 2019

Conversation

stesser
Copy link
Contributor

@stesser stesser commented Jun 7, 2019

Benchmarks show a small but significant speed-up of "make test" if the
limit for the shifting of operands is made more strict. Many operands
will require a second iteration of the inner loop anyway, and shifting
of the operands uses cycles for no gain, then.

To my surprise, BC_BASE_DIGS=4 and =9 seem to have near identical
performance after this change. Some operations (multiplication and
power) ought to be faster with larger BcDigs, but at least for the
performance of "make test" on my system this does not seem to affect
the run-time by a significant amount.

Benchmarks show a small but significant speed-up of "make test" if the
limit for the shifting of operands is made more strict. Many operands
will require a second iteration of the inner loop anyway, and shifting
of the operands uses cycles for no gain, then.

To my surprise, BC_BASE_DIGS=4 and =9 seem to have near identical
performance after this change. Some operations (multiplication and
power) ought to be faster with larger BcDigs, but at least for the
performance of "make test" on my system this does not seem to affect
the run-time by a significant amount.
@gavinhoward gavinhoward merged commit 6f66219 into gavinhoward:master Jun 7, 2019
@gavinhoward
Copy link
Owner

I am not planning on future releases, except for bug fixes. I will merge this now.

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

Successfully merging this pull request may close these issues.

2 participants