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

chore: add Node.js CRC32 for comparison #2

Merged
merged 2 commits into from
Sep 24, 2024
Merged

chore: add Node.js CRC32 for comparison #2

merged 2 commits into from
Sep 24, 2024

Conversation

trivikr
Copy link
Owner

@trivikr trivikr commented Sep 23, 2024

Benchmark for buffer of size 16 KB:
awsCrc32 x 5,878 ops/sec ±0.47% (98 runs sampled)
awsCrtCrc32 x 396,066 ops/sec ±1.08% (93 runs sampled)
nodeJsCrc32 x 562,327 ops/sec ±14.53% (83 runs sampled)
Fastest is nodeJsCrc32

Benchmark for buffer of size 64 KB:
awsCrc32 x 855 ops/sec ±1.76% (65 runs sampled)
awsCrtCrc32 x 112,400 ops/sec ±1.94% (83 runs sampled)
nodeJsCrc32 x 294,393 ops/sec ±7.50% (89 runs sampled)
Fastest is nodeJsCrc32

Benchmark for buffer of size 256 KB:
awsCrc32 x 278 ops/sec ±3.37% (76 runs sampled)
awsCrtCrc32 x 25,769 ops/sec ±6.58% (80 runs sampled)
nodeJsCrc32 x 92,877 ops/sec ±1.91% (92 runs sampled)
Fastest is nodeJsCrc32

Benchmark for buffer of size 1024 KB:
awsCrc32 x 58.60 ops/sec ±6.01% (62 runs sampled)
awsCrtCrc32 x 7,273 ops/sec ±6.00% (89 runs sampled)
nodeJsCrc32 x 22,771 ops/sec ±4.53% (92 runs sampled)
Fastest is nodeJsCrc32

The API was added in May 2024 in nodejs/node#52692
It's available only in v22.2.0+ or v20.15.0+

@trivikr trivikr changed the title docs: update docs to add Node.js built-in chore: add Node.js CRC32 for comparison Sep 23, 2024
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 this pull request may close these issues.

2 participants