-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider adding another regexp engine #167
Comments
This looks interesting! Thank you for bringing it up. Before venturing into integration, I think it's better to find or produce a head-to-head comparison between Rust-based rule-go and C-based Oniguruma regexp impls:
Knowing that would help us to make an informed decision on integration. Same process could be applied to other ways of speeding regexps up e.g using pre-compiled state machines like ragel. |
Note that we had some concurrency problems using oniguruma on gitbase: src-d/gitbase#544 We stopped generating binaries using oniguruma, it is not stable. Other solutions comparison: https://rust-leipzig.github.io/regex/2017/03/28/comparison-of-regex-engines/ Also, there are available other solutions based on Onigmo, an Oniguruma fork: https://github.com/ungerik/gonigmo |
Another possibility: https://github.com/logrusorgru/grokky based on re2 |
rust implementation is just inspired by https://github.com/google/re2. btw. these libraries are not huge and can improve performance for many projects/teams, so why not to start porting one of solutions to native go (maybe tailored for our needs). or just read :) |
To keep the party going - if interested in complicating build and CI envs, there is also a https://github.com/intel/hyperscan |
Note that gitbase will continue to use oniguruma. We forked the go bindings for mainteinance. @kuba-- or @ajnavarro know more about this. |
|
We have already seen that Oniguruma improves enry's performance by a high margin. There are bindings to the regular expression engine in Rust - https://github.com/BurntSushi/rure-go
People say that Rust has one of the fastest implementations, so it makes sense to check how enry works on rure-go.
The text was updated successfully, but these errors were encountered: