BurntSushi/aho-corasick
View on GitHub ↗ ★ 1,307 Rust
A fast implementation of Aho-Corasick in Rust.
20 mentions on Hacker News by 7 people: 1 story, 19 comments · first 2016-01-13 · latest 2025-03-22
20082026
-
And when you put people on a pedestal, they're guaranteed to let you down. :-) https://github.com/BurntSushi/aho-corasick/commit/474393be8d... I wouldn't be surprised if that style of leak were more prevalent than one would expect. It's…
comment by burntsushi · 2025-03-22 · in Oxidizing Ubuntu: adopting Rust utilities by default -
https://github.com/BurntSushi/aho-corasick I've had a lot of fun playing with it, it was very nice & simple to use. It's also foundational in the Rust ecosystem, so it's well maintained.
comment by dwattttt · 2024-10-06 · in Rust needs a web framework -
…* The contiguous NFA in aho-corasick has a lot more going on inside its "next transition" routine: https://github.com/BurntSushi/aho-corasick/blob/cd400ad792d6... --- This is primarily because an Aho-Corasick automaton isn't just a trie.…
comment by burntsushi · 2024-09-10 · in A good day to trie-hard: saving compute 1% at a time -
…but there is a maintained fork which is compatible with more architectures: Vectorscan [5] [1] https://github.com/BurntSushi/aho-corasick/ [2] https://github.com/BurntSushi/aho-corasick/discussions/136 [3]…
comment by dalf · 2024-03-04 · in Aho-Corasick Algorithm -
…but I think it would be better to ask with a concrete example on the issue tracker Discussions: https://github.com/BurntSushi/aho-corasick/discussions All of the tricks I know about (and I judged to be worth doing) are in the aho-corasick…
comment by burntsushi · 2024-01-18 · in Identifying Rust's collect:<Vec<_>>() memory leak footgun -
…a non-contiguous NFA. (Because of the compression tricks it uses.) The interesting bits start here: https://github.com/BurntSushi/aho-corasick/blob/f227162f7c56...
comment by burntsushi · 2024-01-18 · in Identifying Rust's collect:<Vec<_>>() memory leak footgun -
…similar problem, although it wasn't caused by `collect()`. It was caused by "normal" `Vec` usage: https://github.com/BurntSushi/aho-corasick/commit/474393be8d... The issue appeared when building large Aho-Corasick automatons. Otherwise, it…
comment by burntsushi · 2024-01-18 · in Identifying Rust's collect:<Vec<_>>() memory leak footgun -
…[2]: https://github.com/BurntSushi/memchr/blob/c6b885b870b6f1b9bf... [3]: https://github.com/BurntSushi/aho-corasick/blob/f227162f7c56...
comment by burntsushi · 2023-12-26 · in Ask HN: What's the fastest programming language with a large standard library? -
…yet to see it used in the wild. I mentioned exactly that paper (I believe) in my write-up on Teddy: https://github.com/BurntSushi/aho-corasick/tree/master/src/p...
comment by burntsushi · 2023-11-30 · in Ripgrep is faster than grep, ag, Git grep, ucg, pt, sift (2016) -
…is used whenever a small number of literals are searched for. For example, `foo|bar` or `(?i)foo`. https://github.com/BurntSushi/aho-corasick/blob/f227162f7c56... But no `_mm256_sad_epu8`. What an oddly specific question..?
comment by burntsushi · 2023-11-30 · in Ripgrep is faster than grep, ag, Git grep, ucg, pt, sift (2016) -
…a SIMD accelerated multiple substring matching algorithm. There's a nice description of Teddy here: https://github.com/BurntSushi/aho-corasick/tree/f9d633f970bb... It's used in the aho-corasick and regex crates. It now supports SIMD…
comment by killcoder · 2023-09-18 · in Aho-corasick (and the regex crate) now use SIMD on aarch64 -
▲ 5
Aho-corasick (and the regex crate) now use SIMD on aarch64story by killcoder · 2023-09-18 · 1 comment
-
…> For me the State of the Art is Intel HyperScan. Yes. See https://github.com/BurntSushi/rebar and https://github.com/BurntSushi/aho-corasick/tree/feda22857e1d...
comment by burntsushi · 2023-08-29 · in Stringzilla: Fastest string sort, search, split, and shuffle using SIMD -
…pretty quickly. And some regex engines even have grapheme segmentation built in via \X. [1]: https://github.com/BurntSushi/aho-corasick/issues/72 [2]: https://github.com/BurntSushi/bstr/blob/e38e7a7ca986f9499b30... [3]:…
comment by burntsushi · 2022-06-27 · in Let's stop ascribing meaning to code points (2017) -
…using SIMD, including a Rust rewrite of the [Teddy algorithm][1] from the Hyperscan project. [1]: https://github.com/BurntSushi/aho-corasick/tree/4499d7fdb41c...
comment by killercup · 2021-06-14 · in Ripgrep 13.0 -
…has a specialized SIMD algorithm (taken from Hyperscan mostly) for dealing with multiple patterns: https://github.com/BurntSushi/aho-corasick/tree/8b479a60906d... Hyperscan takes this to a different level though. It has oodles more SIMD. I…
comment by burntsushi · 2020-12-14 · in ARM MacBook vs. Intel MacBook: A SIMD Benchmark -
You will probably find https://github.com/BurntSushi/aho-corasick/blob/master/DESIG... good reading. I believe captures get in the way of using the fastest of these NFA-style techniques, though. There's a comment from burntsushi to this…
comment by raphlinus · 2020-06-27 · in Xi-Editor Retrospective -
…is the Teddy algorithm, which I copied from the Hyperscan project. I wrote up how it works here: https://github.com/BurntSushi/aho-corasick/blob/66f581583b69...
comment by burntsushi · 2020-04-10 · in SIMD instructions -
…code, it might be possible to break it by instantiating it on a type with unusual semantics. - https://github.com/BurntSushi/aho-corasick/blob/master/src/f... Looks like unsafe code for "performance reasons". But there are no comments near…
comment by Animats · 2016-12-21 · in Four years with Rust -
…hard to draw conclusions about them without some explicit knowledge of how it is implemented. [1] - https://github.com/BurntSushi/aho-corasick
comment by burntsushi · 2016-01-13 · in Two Weeks of Rust