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

golang: Use pointer receiver where appropriate #578

Merged
merged 1 commit into from
Jul 31, 2018

Conversation

lkramer
Copy link

@lkramer lkramer commented Jul 31, 2018

  • In order to avoid copying the whole structure functions should use pointer receiver when possible.
  • One exception is for enums, where it makes more sense to keep the copy receivers.

- In order to avoid copying the whole structure functions should use pointer receiver when possible.
- One exception is for enums, where it makes more sense to keep the copy receivers.
@mjpt777
Copy link
Contributor

mjpt777 commented Jul 31, 2018

Maybe @billsegall can comment on this?

@billsegall
Copy link
Contributor

I'm happy with this. It's 100% compatible and benchmarks faster on Encode. Good stuff.

@mjpt777 mjpt777 merged commit fe5a25d into real-logic:master Jul 31, 2018
@lkramer lkramer deleted the optimize_functions branch August 1, 2018 04:21
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.

3 participants