Contention on multi-threaded regex matching

This page summarizes the projects mentioned and recommended in the original post on /r/rust

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • regex

    An implementation of regular expressions for Rust. This implementation uses finite automata and guarantees linear time matching on all inputs.

  • Yeah, regex used thread_local itself many years for exactly this problem: https://github.com/rust-lang/regex/pull/200

  • rust

    Empowering everyone to build reliable and efficient software.

  • They're saying that there's a thread_local attribute available on nightly that hasn't been stabilized yet, and that it's nicer than the macro you're currently stuck with.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • I added the article's benchmark to the safe-regex benchmarks. I reduced the number of strings checked from 100M to 1M so the benchmark runs in a few seconds. Here are the results running on my 2018 MBP 4-core i5-8259U. You can see that regex is faster on large strings and safe-regex is faster on small strings and in heavy multi-threaded use.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Common Rust Lifetime Misconceptions

    4 projects | news.ycombinator.com | 4 Dec 2023
  • Examples of old (ca. 1.0.0+) Rust code that still compiles?

    17 projects | /r/rust | 15 Feb 2023
  • Earley Parsing Explained

    3 projects | /r/rust | 19 Aug 2022
  • Security advisory for the regex crate (CVE-2022-24713) | Rust Blog

    5 projects | /r/rust | 8 Mar 2022
  • Speed of Rust vs. C

    17 projects | news.ycombinator.com | 12 Mar 2021