-
Notifications
You must be signed in to change notification settings - Fork 13
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
Implement Reverse Input/Output Lookup Table when running table_based #40
Comments
Hi @gaiuscosades, first of all thanks for taking the time for creating the issue and the kind words regarding the package, appreciate it. best |
Thank you @Nicoretti, I of course totally understand that you are on a time budget especially since this issue is far from critical! Still this improvement could be interesting for someone looking for a significant speedup while staying python only! Best Wishes |
fastcrc is using a rust based implementation, this may be a suitable alternative for you
agreed ✔️ |
Absolutely, found it yesterday! So the ease of use and versatility of this project will not be beaten any time soon... ;D |
From what I have seen no such api currently is exposed from the rust library part. One would need to add API for it or add the specific algorithm/configuration. Adding a algorithm/configuration should be pretty straight forward for someone with rust knowledge. |
Thanks you for your remarks.
What do you exactly mean by "exposed"? As I understand the Rust part is adaped from https://github.com/mrhooray/crc-rs which shows the desired functionality in it's first example of README.md. Again as I have absolutely no experience with Rust: Is a compiled artifact of crc-rs part of fastcrc, or is https://github.com/overcat/fastcrc/blob/main/src/lib.rs the only Rust Code present and the lines 1 to 10 of src/lib.rs simply point to a standard Rust library that configures these, which could be extended? Greetings |
Well, yes the library which fastcrc uses to provide the crc functionality would support the desired functionality, but from Basically fastcrc just is a thin wrapper around the
|
I use the module with the following configuration.
Performance when crunching big payloads was in the range that I expected.
But while profiling other code I noticed that a vast amount of time was spent simply reversing the input bytes.
I now use the module without reversed_input and reverse the input externally (bytes.translate) which I propose should be done inside the library when running in Table Based Mode, as the memory overhead is negligible, but leads to a 45% speedup in my setup.
Alternatively I think one could transpose the whole lookup table when working with reversed input to get even better performance.
Greetings to the maintainers of this very helpful package.
The text was updated successfully, but these errors were encountered: