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

Improve 128-bit multiplication performance #9744

Merged
merged 2 commits into from Oct 26, 2021

Conversation

martint
Copy link
Member

@martint martint commented Oct 22, 2021

before

BenchmarkUnscaledDecimal128.multiply128       avgt   60  10.258 ± 0.419  ns/op
BenchmarkUnscaledDecimal128.multiplyLongInt   avgt   60   7.894 ± 0.137  ns/op
BenchmarkUnscaledDecimal128.multiplyLongLong  avgt   60   8.038 ± 0.137  ns/op

after

BenchmarkUnscaledDecimal128.multiply128       avgt   60  8.048 ± 0.174  ns/op
BenchmarkUnscaledDecimal128.multiplyLongInt   avgt   60  5.171 ± 0.035  ns/op
BenchmarkUnscaledDecimal128.multiplyLongLong  avgt   60  5.381 ± 0.037  ns/op

Copy link
Member

@lukasz-stec lukasz-stec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. I would like this change just for readability improvements even if was not improving performance

@martint martint force-pushed the decimal-multiply-perf branch 2 times, most recently from deb52ce to c7e6b44 Compare October 26, 2021 19:16
before

BenchmarkUnscaledDecimal128.multiply128       avgt   60  10.258 ± 0.419  ns/op
BenchmarkUnscaledDecimal128.multiplyLongInt   avgt   60   7.894 ± 0.137  ns/op
BenchmarkUnscaledDecimal128.multiplyLongLong  avgt   60   8.038 ± 0.137  ns/op

after

BenchmarkUnscaledDecimal128.multiply128       avgt   60  8.048 ± 0.174  ns/op
BenchmarkUnscaledDecimal128.multiplyLongInt   avgt   60  5.171 ± 0.035  ns/op
BenchmarkUnscaledDecimal128.multiplyLongLong  avgt   60  5.381 ± 0.037  ns/op
@martint martint merged commit aac95d2 into trinodb:master Oct 26, 2021
@martint martint added this to the 364 milestone Oct 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

5 participants