-
Notifications
You must be signed in to change notification settings - Fork 62
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
Make generic over a Field trait #40
Conversation
Codecov Report
@@ Coverage Diff @@
## master #40 +/- ##
=========================================
+ Coverage 96.22% 96.3% +0.07%
=========================================
Files 7 7
Lines 2624 2649 +25
=========================================
+ Hits 2525 2551 +26
+ Misses 99 98 -1
Continue to review full report at Codecov.
|
I'd be interested to see if there is a performance hit for GF(2^8) with the generification. |
I can try benchmarking it later. If there is a significant performance hit, what would be your suggestion though? |
Sorry haven't quite gotten to setting up benchmarking due to time constraint, but I went through the changes and it should be fine, as Majority of the execution time during encoding is spent in Galois coding, specifically
|
The benchmarks show as much slower, but this is mostly because of the removal of Rayon. I wouldn't imagine that this change would make things slower except in some real failure of monomorphization. |
Huh, so rayon did speed things up a lot. Do you have the specific numbers? |
Old:
New:
|
Totally makes sense that rayon speeds things up IMO. |
Thanks for benchmarking! Okay yeah, that makes a lot of sense now that I think about it, independent slice coding do allow speed up linear to (parity) shard count. But yeah, the generification itself seems fine. If we really want, we can benchmark with rayon set to using single thread, then it should show the overhead of generifcation, if any exists at all. But I personally don't feel this is too useful. |
(I was accidentally benchmarking w/o simd acceleration due to the feature change) Old without rayon:
New with
|
In short, seems about the same. Rayon can roughly double throughput in this configuration. |
Sounds about right - 2 parity shards are used in the benchmarks. So I think this PR looks good, as nothing important is changed. I'm not sure if there's a very good way to test the I'll merge this if you think it's okay. |
yes please :) |
And implement it for
galois_8
.After #38 I will add an implementation for
galois_16
as well.