8000 helper.go: removing unused member Name of variable struct by it1804 · Pull Request #338 · gosnmp/gosnmp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

helper.go: removing unused member Name of variable struct #338

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

Merged
merged 1 commit into from
Oct 7, 2021

Conversation

it1804
Copy link
Contributor
@it1804 it1804 commented May 14, 2021

The "Name []int" member of the variable structure is not used. Removing it saves 24 B/op
Pre-allocate the SnmpPDU slice should be noticeable with a large number of simultaneously requested oids.

@it1804 it1804 force-pushed the removing_struct_member branch 4 times, most recently from 9258fe7 to 55fd2fc Compare May 14, 2021 23:14
@TimRots
Copy link
Member
TimRots commented May 14, 2021

Thanks for your continuous efforts @it1804!

It would be preferred to split changes like these up into separate PR's for review and further discussion.

@it1804 it1804 force-pushed the removing_struct_member branch from 55fd2fc to 0bce768 Compare May 15, 2021 00:55
@it1804
Copy link
Contributor Author
it1804 commented May 15, 2021

I managed to improve in total for all changes with this PR and #341 and #340

Without the gosnmp_nodebug tag

BenchmarkSendOneRequest-24                100000             63342 ns/op            2224 B/op         72 allocs/op

And with the tag gosnmp_nodebug

BenchmarkSendOneRequest-24                100000             57778 ns/op            1752 B/op         43 allocs/op

@it1804 it1804 force-pushed the removing_struct_member branch from 0bce768 to c63cba9 Compare May 18, 2021 18:23
@it1804
Copy link
Contributor Author
it1804 commented May 18, 2021

I split these commits. There is only one left here.

@SuperQ
Copy link
Contributor
SuperQ commented Oct 6, 2021
8000

Sorry, this needs a rebase.

Signed-off-by: Ivan Torgashov <it1804@mail.ru>
@it1804 it1804 force-pushed the removing_struct_member branch from c63cba9 to c59796f Compare October 6, 2021 14:31
Copy link
Contributor
@SuperQ SuperQ left a comment

Choose a reason for hiding this comment

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

LGTM, Thanks

@SuperQ SuperQ requested a review from TimRots October 7, 2021 05:02
@SuperQ SuperQ merged commit 987a4fc into gosnmp:master Oct 7, 2021
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
0