Regex Performance

The cluster focuses on discussions about the performance of regex engines and libraries across programming languages, including comparisons, optimizations like JIT and DFA compilation, and specific implementations such as Rust's regex, RE2, PCRE, and Hyperscan.

📉 Falling 0.4x Programming Languages
1,915
Comments
20
Years Active
5
Top Authors
#3962
Topic ID

Activity Over Time

2007
2
2008
14
2009
29
2010
47
2011
62
2012
60
2013
115
2014
116
2015
104
2016
195
2017
141
2018
103
2019
161
2020
112
2021
119
2022
174
2023
136
2024
107
2025
107
2026
11

Keywords

e.g PHP CPU RE2 JIT jarvana.com PR FAQ PCRE PCRE2 regex compile rust library matching expression optimizations engine string performance

Sample Comments

episteme • Jul 9, 2022 • View on HN

I thought Regex was typically less performant than string operations?

dana321 • Nov 29, 2025 • View on HN

Imagine hardening the regex library, its already as slow as molasses.

Ygg2 • Apr 27, 2014 • View on HN

How does this compare to other regex parsing libraries, performance wise?

sitkack • Jul 6, 2014 • View on HN

Until they implement a JIT and compile the regex.

fortran77 • Sep 29, 2019 • View on HN

Is the Rust regex engine slow because it's written in Rust?

austincheney • Jan 20, 2017 • View on HN

Is regex execution considered efficient? I have always been impressed with its speed.

Phelinofist • Dec 30, 2023 • View on HN

Any experience with performance? This seems to be heavy with regexes

sansnomme • Nov 30, 2019 • View on HN

What sort of Regex are they using? The garden variety can be compiled to DFAs (O(n)) which a modern computer should have no issues handling. Further optimizations

burntsushi • Jan 21, 2017 • View on HN

I am responding to your claim. I'm saying that not all regex implementations are created equal. Some can be just as fast as what you might write by hand.

dang • Sep 12, 2022 • View on HN

Related:Hyperscan: High-performance multiple regex matching library from Intel - https://news.ycombinator.com/item?id=21873557 - Dec 2019 (53 comments)Hyperscan: A Fast Multi-Pattern Regex Matcher for Modern CPUs - https://news.ycombinator.com/item?id=19270199 - Feb 201