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

Proposal: use light-weight bitmask instead of gonums's mat.Dense #22

Closed
liamsi opened this issue Apr 2, 2021 · 1 comment · Fixed by #33
Closed

Proposal: use light-weight bitmask instead of gonums's mat.Dense #22

liamsi opened this issue Apr 2, 2021 · 1 comment · Fixed by #33

Comments

@liamsi
Copy link
Member

liamsi commented Apr 2, 2021

This float64 slice
https://github.com/lazyledger/rsmt2d/blob/ef1d6c54461edaa428b5720835b6b522c18defff/extendeddatacrossword.go#L52-L63
is used to initialize a dense matrix: https://github.com/lazyledger/rsmt2d/blob/ef1d6c54461edaa428b5720835b6b522c18defff/extendeddatacrossword.go#L82

It looks like this could be vastly improved by using some form of 2d-bitmask to look up if a cell in a row or column is present or not, or if a row / column is incomplete. So instead of 64 bits per element, we could reduce that to 1 bit per element.

We can either look for a small library out there to use or we can write this our selves.

@liamsi liamsi changed the title Proposal: use some light-weight bitmask instead of gonums's mat.Dense Proposal: use light-weight bitmask instead of gonums's mat.Dense Apr 2, 2021
@liamsi
Copy link
Member Author

liamsi commented Apr 2, 2021

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

Successfully merging a pull request may close this issue.

1 participant