safe-regex-rs
re2
safe-regex-rs | re2 | |
---|---|---|
4 | 1 | |
- | 34 | |
- | - | |
- | 7.8 | |
- | over 2 years ago | |
Python | ||
- | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
safe-regex-rs
-
Contention on multi-threaded regex matching
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.
-
Let's Build a Regex Engine
The matcher for "(abc)d" [2] is a more thorough example.
[0] https://gitlab.com/leonhard-llc/safe-regex-rs/-/blob/79106c0...
[1] https://gitlab.com/leonhard-llc/safe-regex-rs/-/blob/79106c0...
[2] https://gitlab.com/leonhard-llc/safe-regex-rs/-/blob/79106c0...
re2
-
Let's Build a Regex Engine
I have a (mostly abandoned, since I couldn't find an organization to cbe early adopter in the time I gave myself to work on it) side project with this aim. I spent a lot of time thinking about language design, from the perspective of enabling adoption of a new language when an existing one has so much network effect:
https://www.slideshare.net/AurSaraf/re3-modern-regex-syntax-...
https://github.com/sonoflilit/re2
What are some alternatives?
regex - An implementation of regular expressions for Rust. This implementation uses finite automata and guarantees linear time matching on all inputs.
Scala.js - Scala.js, the Scala to JavaScript compiler
reng - Simple toy regex engine implemented using backtracking algorithm and continuations.
zorex - Zorex: the omnipotent regex engine
caniuse - Raw browser/feature support data from caniuse.com
rust - Empowering everyone to build reliable and efficient software.