crc: crc32_iscsi_by8_02 opt when data become 16 bytes or less #375
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When data become 16 bytes or less, the final result is gained by folding and barrett reduction with
VPCLMULQDQincrc32_iscsi_by8_02. This is less efficient than usingCRC32instruction directly on x86 platform.In this commit, we use
CRC32instruction to calculate:_barrettand other deprecated codes are removed.Besides, we add several fastpaths for short data at the very beginning. It will notice the short data as early as possible and prevent it from the long control flow in the procedure. The entry points (i.e. 4/8/16 bytes) are choosed based on the balance of performance of all data length less than 16 bytes.
Performance data are listed below (iterations per second):