-
Notifications
You must be signed in to change notification settings - Fork 225
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
Add optimizations to encoder and decoder #387
base: master
Are you sure you want to change the base?
Conversation
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.
Thanks for your initiative, but this won't be merged without some larger changes / issues:
- For the actual performance improvements, please provide benchmarks and comparisons using
benchstat
- You're combining lots of changes which are not strictly related into one single PR (e.g. changing the linting config and fixing the resulting issues). These might be valid, but should be discussed and merged separately to make review easier. Right now this is too big to review sensibly - for that reason, I only briefly scanned the PR and combined other issues I could spot easily that prevent merging.
@@ -44,6 +43,7 @@ func (e InvalidTypeError) Error() string { | |||
// their elements don't match. | |||
func Store(src []interface{}, dest ...interface{}) error { | |||
if len(src) != len(dest) { | |||
fmt.Printf("%#v %#v\n", src, dest) |
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.
leftover debugging print
@@ -1,5 +1,5 @@ | |||
module github.com/godbus/dbus/v5 | |||
module github.com/pboyd04/dbus/v5 |
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.
changed module path
"testing" | ||
) | ||
|
||
/* This seems to be broken. Commenting out for now. |
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 not just comment out tests. This test passes locally on my machine and in CI; it of course depends on having D-Bus installed. If it doesn't pass for some reason on your machine, please open a separate issue.
if err != nil { | ||
t.Fatal(err) | ||
} | ||
expected := [][]byte{ |
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.
these binary outputs should be moved to testdata files that are read during test runtime
Ok I will do this a bit more piecemeal. Here is the first of the new pulls only doing test changes so that all Benchmarks and tests are apples to apples. #394 |
Add optimizations to encoder and decoder to reduce allocations and increase speed