hsivonen / hsivonen/encoding_rs
Experiment with interleaving UTF-8 writes with simdutf8 block validation
Open
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 464
- Forks
- 70
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 2
Description
Currently, the simdutf8 path first validates the whole input and then memcpys the whole thing, because that made sense when there were possible non-SIMD reads.
In the simdutf8 case, consider interleaving validation and writing of 64-byte blocks.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the simdutf8 path and trace how whole-input validation is followed by the memcpy. Experiment with interleaving validation and writing in 64-byte blocks, then verify that UTF-8 validation behavior remains correct and compare the result with the existing approach.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- performance
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100