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

protocodec: make a few tweaks to allow inlining #45

Merged
merged 1 commit into from
Apr 9, 2024

Conversation

dfinkel
Copy link

@dfinkel dfinkel commented Apr 9, 2024

protocodec.GalaxyGet is particularly hot, and trivial so it should get
inlined. Make a few tweaks to allow inlining. (bringing the cost down
below the magic 80 number in the go compiler)

Similarly, split up protocodec.backendGetterV2.Get to allow inlining of
the fast path. (Amusingly, this also allows the new setSlow to inline,
but that wasn't the goal)

protocodec.GalaxyGet is particularly hot, and trivial so it should get
inlined. Make a few tweaks to allow inlining. (bringing the cost down
below the magic 80 number in the go compiler)

Similarly, split up protocodec.backendGetterV2.Get to allow inlining of
the fast path. (Amusingly, this also allows the new `setSlow` to inline,
but that wasn't the goal)
@dfinkel dfinkel force-pushed the protocodec_inline_optimizations branch from ca3c944 to f34785d Compare April 9, 2024 23:02
@dfinkel dfinkel merged commit efe6cae into master Apr 9, 2024
16 checks passed
@dfinkel dfinkel deleted the protocodec_inline_optimizations branch April 9, 2024 23:19
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