ashi009 / ashi009/node-fast-crc32c

Replace sse4_crc32 with @node-rs/crc32

Open
#21 10 comments 3 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
30
Forks
21
PR merge metrics
No merged PRs in 30d

Description

https://github.com/Brooooooklyn/node-rs/tree/master/packages/crc32

Here is benchmark on my machine:

```
Model Name: MacBook Pro
Model Identifier: MacBookPro15,1
Processor Name: Intel Core i7
Processor Speed: 2.6 GHz
Number of Processors: 1
Total Number of Cores: 6
L2 Cache (per Core): 256 KB
L3 Cache: 12 MB
Hyper-Threading Technology: Enabled
Memory: 16 GB
```

Benchmark:
```
@node-rs/crc32c for inputs 1024B x 5,264,095 ops/sec ±1.20% (93 runs sampled)
@node-rs/crc32c for inputs 16829745B, avg 2054B x 263 ops/sec ±11.01% (71 runs sampled)
sse4_crc32c_hw for inputs 1024B x 3,605,658 ops/sec ±1.00% (91 runs sampled)
sse4_crc32c_hw for inputs 16829745B, avg 2054B x 211 ops/sec ±1.08% (72 runs sampled)
sse4_crc32c_sw for inputs 1024B x 1,533,277 ops/sec ±0.83% (92 runs sampled)
sse4_crc32c_sw for inputs 16829745B, avg 2054B x 99.14 ops/sec ±1.90% (73 runs sampled)
js_crc32c for inputs 1024B x 439,854 ops/sec ±2.55% (89 runs sampled)
js_crc32c for inputs 16829745B, avg 2054B x 26.27 ops/sec ±2.87% (47 runs sampled)
js_crc32 for inputs 1024B x 422,623 ops/sec ±2.52% (83 runs sampled)
js_crc32 for inputs 16829745B, avg 2054B x 28.34 ops/sec ±1.64% (51 runs sampled)
+-----------------+-------------------+----------------------+
| │ 1024B │ 16829745B, avg 2054B |
+-----------------+-------------------+----------------------+
| @node-rs/crc32c │ 5,264,095 ops/sec │ 263 ops/sec |
+-----------------+-------------------+----------------------+
| sse4_crc32c_hw │ 3,605,658 ops/sec │ 211 ops/sec |
+-----------------+-------------------+----------------------+
| sse4_crc32c_sw │ 1,533,277 ops/sec │ 99.14 ops/sec |
+-----------------+-------------------+----------------------+
| js_crc32c │ 439,854 ops/sec │ 26.27 ops/sec |
+-----------------+-------------------+----------------------+
| js_crc32 │ 422,623 ops/sec │ 28.34 ops/sec |
+-----------------+-------------------+----------------------+
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Review the current sse4_crc32 integration and the linked @node-rs/crc32 package first. Replace the existing implementation while preserving CRC-32C behavior, then rerun the available benchmarks to confirm the replacement works and compare performance.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
backend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.