Skip to content
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

Faster erasure codes #30

Open
catid opened this issue Feb 2, 2018 · 4 comments
Open

Faster erasure codes #30

catid opened this issue Feb 2, 2018 · 4 comments

Comments

@catid
Copy link

catid commented Feb 2, 2018

Please consider this newer O(N Log N) time approach for future versions of ISA-L erasure codes, which supports up to 65536 symbols:

https://github.com/catid/leopard

@catid
Copy link
Author

catid commented Feb 2, 2018

Without modifying ISA-L too much there are some quick optimizations possible:

(1) Modify the Cauchy matrix structure to make the first row all ones similar to Vandermonde matrix by dividing each column by the first element in that column.
Demonstrated here: https://github.com/catid/cm256/blob/master/cm256.cpp#L128
This means you can just XOR the first row:
https://github.com/catid/cm256/blob/master/cm256.cpp#L153
It's much faster if you have a lot of input data but just a few outputs..

(2) Use faster Schur-type-direct-Cauchy algorithm to produce LDU-decomposition of the generator matrix directly in O(N^2) instead of O(N^3).
Demonstrated here: https://github.com/catid/cm256/blob/master/cm256.cpp#L345

@dong-liuliu
Copy link
Contributor

thanks for the suggestion, Catid.
Let's start to understand these algorithms first.

@gbtucker
Copy link
Contributor

gbtucker commented Feb 7, 2018

Thanks for the suggestions. Note that ec_encode_data() functions work for any encoding matrix. On (2) do I understand this correctly that it will only work on Cauchy encoding matrices? We did write a general matrix inverse using LU decomposition and a vectorized version but it seems the LU one was only marginally faster and only for very large n. We could add more example encoding matrices gf_gen_cauchy2_matrix(), etc. if useful.

@catid
Copy link
Author

catid commented Feb 22, 2018

Yeah I think it’s slower for small matrices. The Cauchy specific LDU method was faster past 16 or so IIRC but it has been a while since I tested that. Also it doesn’t improve performance for banded matrices found in streaming erasure codes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants