hsivonen / hsivonen/encoding_rs

Experiment with prefetch hints

Open
#142 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
464
Forks
70
Avg merge
2d 4h
Merged PRs (30d)
2

Description

simdutf8 appears to get value out of cache prefix hints. Experiment with using cache prefix hints in this crate.

The portable ones https://doc.rust-lang.org/std/hint/fn.prefetch_read.html and https://doc.rust-lang.org/std/hint/fn.prefetch_write.html are nightly-only, but so is core::simd.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing simdutf8’s cache prefix hint approach with encoding_rs’s relevant hot paths. Read Rust’s prefetch_read and prefetch_write documentation, noting that both are nightly-only like core::simd. Done means the crate has a measured experiment showing whether these hints provide value.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
performance
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.