-
Notifications
You must be signed in to change notification settings - Fork 57
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
Avoid heap allocations in Htonl #55
Conversation
pkg/rpmdb_test.go
Outdated
@@ -119,6 +119,17 @@ func TestPackageList(t *testing.T) { | |||
} | |||
}) | |||
} | |||
|
|||
for _, tt := range tests { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this test? ListPackages
is already tested above and this test doesn't seem to add any value for testing. BenchmarkXXX
makes more sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely. Let me arrange that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done 24028bb
Before
AFTER
|
Thanks |
Avoids heap allocations when in Htonl.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.