-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Experiment ac rust/v4 #9902
Experiment ac rust/v4 #9902
Conversation
Avoid redundant pointer checks; instead check once.
Count uniq matches only, like the Hyperscan implementation. Ticket: OISF#3847.
let p = unsafe { build_slice!(pat, pat_len as usize) }; | ||
let s = unsafe { build_slice!(sids, sids_len as usize) }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unsafe not needed here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, this is a left over from when clippy adviced to mark the function unsafe, even though the compiler didn't require it. It feels odd to make the function unsafe while the unsafe parts are more limited. I would like rust to consider the other parts safe and be strict in its checks.
replaced by #9904 |
#9896 with some fixes and updated the match loop to only count unique matches.
Still have to do benchmarks.
Experiment to see if we can use aho-corasick Rust crate for our MPM.
https://redmine.openinfosecfoundation.org/issues/3847
TODOs