-
Notifications
You must be signed in to change notification settings - Fork 247
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
Try further optimize ReconstructSome for leopard 8+16 #274
Conversation
7a3b1b5
to
b4df876
Compare
b4df876
to
08a1be0
Compare
errorBits.set(i) | ||
} | ||
} | ||
for i := 0; i < r.dataShards; i++ { | ||
if len(shards[i]) == 0 { | ||
if len(shards[i]) == 0 /*&& (recoverAll || (required != nil && required[i]))*/ { |
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.
Uncommenting this leads to more significant improvements in BenchmarkDecode1K
but will lead to a bunch of test failures (I think mostly because ReconstructData
expects to reconstruct all original missing data). This can probably be fixed.
errorBits.set(i) | ||
} | ||
} | ||
for i := 0; i < r.dataShards; i++ { | ||
if len(shards[i]) == 0 { | ||
if len(shards[i]) == 0 /*&& (recoverAll || (required != nil && required[i]))*/ { |
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.
same as in leopard.go:
https://github.com/klauspost/reedsolomon/pull/274/files#r1511442291
Note that I suggest adding some more detailed tests. |
Yeah, that makes sense. I was hoping that @elias-orijtech could try to optimize, test, and benchmark this further. I think particularly the Line 410 in 2d78890
I was also surprised it is constructed at all if we already know with the line if it is needed or not (I'm guessing it is rather inexpensive but it seems somewhat unnecessary. |
Closing in favour of #272 |
Trying:
This might lead to failing tests. But if not this should be much faster than before.
builds on changes introduced in #272