crc icon indicating copy to clipboard operation
crc copied to clipboard

non-NIF CRC algorithm Implementation

Open TattdCodeMonkey opened this issue 5 years ago • 0 comments

For small binaries an elixir implementation can be more performant especially for nerves devices.

If we implement non-NIF version for CRC algorithm we could add an optional parameter to use the non-NIF calculation for users who know their payloads are small and would prefer to not load the NIF.

During implementation we have the NIFs to unit test against.

If useful we could also look at adding an optional threshold param to use vs not use the NIF.

Goals:

  • [ ] pure elixir CRC algorithm implementation
  • [ ] Support for all models the NIF supports.
  • [ ] Unit test elixir calculation with NIF implementation.
  • [ ] crc/2 & calculate/2 takes optional param to choose not to use NIF, should default to current behavior of using NIF
  • [ ] ☝️ default switched to not use NIF

TattdCodeMonkey avatar Aug 26 '20 16:08 TattdCodeMonkey