-
regex
An implementation of regular expressions for Rust. This implementation uses finite automata and guarantees linear time matching on all inputs.
-
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.
Yeah, regex used thread_local itself many years for exactly this problem: https://github.com/rust-lang/regex/pull/200
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.
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.