Skip to content

Commit fec00fb

Browse files
committed
Check the chunked pure-Python CRC64NVME against a bitwise CRC
CRC64NVME shares the chunked big-integer path with CRC32C, which takes it from about 15 MB/s to about 135 MB/s. Add it to the test that checks that path against a bit-at-a-time CRC around the chunk and tail boundaries.
1 parent 62f0fcf commit fec00fb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎packages/smithy-checksums/tests/unit/test_implementations.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ def _bitwise_crc(poly: int, width: int, data: bytes) -> str:
198198

199199
@pytest.mark.parametrize(
200200
("algorithm", "poly", "width"),
201-
[("crc32c", 0x82F63B78, 32)],
201+
[("crc32c", 0x82F63B78, 32), ("crc64nvme", 0x9A6C9329AC4BC9B5, 64)],
202202
)
203203
def test_chunked_crc_matches_bitwise(algorithm: str, poly: int, width: int) -> None:
204204
# The pure CRCs hash whole chunks with masks, short tails with a table, and

0 commit comments

Comments
 (0)