{"slug": "memchr", "name": "memchr", "category": "dev-libs", "category_name": "Libraries and frameworks", "description": "", "recommenders": 3, "commenters": 3, "warners": 0, "score": 1.96, "rising": 0.35, "first": "2025-11-06", "latest": "2026-09-11", "why": "The `memchr` crate uses abstraction to limit the code duplication", "why_is_quote": true, "has_verdict": false, "sentiment": {"recommend": 3, "neutral": 0, "compare": 0, "warn": 0}, "spark": [1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0], "listed": true, "loved": [], "caveat": "", "short_quote": "The `memchr` crate uses abstraction to limit the code duplication", "kind": "", "icon": false, "domain": null, "github_repo": "github.com/burntsushi/memchr", "official_url": "https://github.com/BurntSushi/memchr", "pricing": "", "aliases": ["memchr"], "verdict": null, "praise": [{"label": "", "summary": "", "quotes": [{"id": 794576880, "item_id": 49661055, "url": "https://news.ycombinator.com/item?id=49661055", "by": "Rendello", "date": "2026-09-11", "version": null, "stance": "recommend", "quote": "Low level: memchr [1];", "excerpt": "I like burntsushi's string-searching work because it's well documented, split modularly into libraries/applications, and runs the gamut from low- to high-level (his blog posts and comments online are extremely helpful too). I use these three tools which he maintains: Low level: memchr [1]; Medium level: Regex (Rust crate) [2]; High level: ripgrep [3]. Other names to look out for are the previously aforementioned Wojc", "context": "", "use_case": "fast string searching", "switched_from": "", "story": "Bitap: My favorite string matching algorithm"}, {"id": 745753586, "item_id": 46609599, "url": "https://news.ycombinator.com/item?id=46609599", "by": "kotysoft", "date": "2026-01-13", "version": null, "stance": "recommend", "quote": "'memchr' is used heavily for lexical scanning.", "excerpt": "TITLE: Show HN: Giant JSON Viewer \u2013 Open 1GB+ JSON files on Android (Rust + mmap) COMMENT: Hi HN, I'm the developer of Giant JSON Viewer. I built this primarily as an engineering challenge. I was bored and didn't want to release just another generic utility app (there are already 1000s of identical JSON viewers on the Play Store). I wanted to build something unique that pushes the limits of what's possible on a phone", "context": "", "use_case": "SIMD byte scanning", "switched_from": "", "story": "Show HN: Giant JSON Viewer \u2013 Open 1GB+ JSON Files on Android (Rust and MMAP)"}, {"id": 733373776, "item_id": 45835861, "url": "https://news.ycombinator.com/item?id=45835861", "by": "burntsushi", "date": "2025-11-06", "version": null, "stance": "recommend", "quote": "The `memchr` crate uses abstraction to limit the code duplication", "excerpt": "It's not quite that dire. The `memchr` crate uses abstraction to limit the code duplication: https://github.com/BurntSushi/memchr/blob/1230fc5c638a4d922f4e00a87adf8929007f2417/src/vector.rs That is, the `memchr` crate has a `Vector` trait that is generic over the vector type. Which is essentially your `DataStructure<S>` where `S` is the ISA. (Using the vector type isn't load bearing. I could do the ISA. But in `memch", "context": "", "use_case": "", "switched_from": "", "story": "The state of SIMD in Rust in 2025"}]}], "caveats": [], "who": [], "tags": [], "use_cases": ["fast string searching", "simd byte scanning"], "compared": [], "makers": [], "threads": [{"url": "https://news.ycombinator.com/item?id=45826348", "title": "The state of SIMD in Rust in 2025", "mentions": 2}, {"url": "https://news.ycombinator.com/item?id=49609195", "title": "Bitap: My favorite string matching algorithm", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=46609592", "title": "Show HN: Giant JSON Viewer \u2013 Open 1GB+ JSON Files on Android (Rust and MMAP)", "mentions": 1}], "sentiment_by_month": {"2025-11": {"recommend": 1}, "2025-12": {}, "2026-01": {"recommend": 1}, "2026-02": {}, "2026-03": {}, "2026-04": {}, "2026-05": {}, "2026-06": {}, "2026-07": {}, "2026-08": {}, "2026-09": {"recommend": 1}, "2026-10": {}}, "versions": [], "version_unnamed": 0, "quotes": [{"id": 794576880, "item_id": 49661055, "url": "https://news.ycombinator.com/item?id=49661055", "by": "Rendello", "date": "2026-09-11", "version": null, "stance": "recommend", "quote": "Low level: memchr [1];", "excerpt": "I like burntsushi's string-searching work because it's well documented, split modularly into libraries/applications, and runs the gamut from low- to high-level (his blog posts and comments online are extremely helpful too). I use these three tools which he maintains: Low level: memchr [1]; Medium level: Regex (Rust crate) [2]; High level: ripgrep [3]. Other names to look out for are the previously aforementioned Wojc", "context": "", "use_case": "fast string searching", "switched_from": "", "story": "Bitap: My favorite string matching algorithm"}, {"id": 745753586, "item_id": 46609599, "url": "https://news.ycombinator.com/item?id=46609599", "by": "kotysoft", "date": "2026-01-13", "version": null, "stance": "recommend", "quote": "'memchr' is used heavily for lexical scanning.", "excerpt": "TITLE: Show HN: Giant JSON Viewer \u2013 Open 1GB+ JSON files on Android (Rust + mmap) COMMENT: Hi HN, I'm the developer of Giant JSON Viewer. I built this primarily as an engineering challenge. I was bored and didn't want to release just another generic utility app (there are already 1000s of identical JSON viewers on the Play Store). I wanted to build something unique that pushes the limits of what's possible on a phone", "context": "", "use_case": "SIMD byte scanning", "switched_from": "", "story": "Show HN: Giant JSON Viewer \u2013 Open 1GB+ JSON Files on Android (Rust and MMAP)"}, {"id": 733387665, "item_id": 45836729, "url": "https://news.ycombinator.com/item?id=45836729", "by": "burntsushi", "date": "2025-11-06", "version": null, "stance": "compare", "quote": "which has more sophistication than `memchr`", "excerpt": "I don't deny that there are downsides. But your original comment was misleading. Hence my clarification. Your comment was too absolute. It is possible to avoid duplication and build some sound abstractions. I use the same technique in the `aho-corasick` crate (which has more sophistication than `memchr`) and it works there too.", "context": "", "use_case": "", "switched_from": "", "story": "The state of SIMD in Rust in 2025"}, {"id": 733373776, "item_id": 45835861, "url": "https://news.ycombinator.com/item?id=45835861", "by": "burntsushi", "date": "2025-11-06", "version": null, "stance": "recommend", "quote": "The `memchr` crate uses abstraction to limit the code duplication", "excerpt": "It's not quite that dire. The `memchr` crate uses abstraction to limit the code duplication: https://github.com/BurntSushi/memchr/blob/1230fc5c638a4d922f4e00a87adf8929007f2417/src/vector.rs That is, the `memchr` crate has a `Vector` trait that is generic over the vector type. Which is essentially your `DataStructure<S>` where `S` is the ISA. (Using the vector type isn't load bearing. I could do the ISA. But in `memch", "context": "", "use_case": "", "switched_from": "", "story": "The state of SIMD in Rust in 2025"}]}