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/v11 #9911
Experiment ac rust/v11 #9911
Conversation
MPM_HS does not need a guard.
Bring implementation in line with Hyperscan, which only counts unique matches. Update test to reflect the new behavior.
Bring implementation in line with Hyperscan, which only counts unique matches. Update test to reflect the new behavior.
Fall back to default matcher. Ticket OISF#6586.
Avoid redundant pointer checks; instead check once.
Count uniq matches only, like the Hyperscan implementation. Default to single context, similar to other algos. Ticket: OISF#3847.
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #9911 +/- ##
==========================================
- Coverage 82.45% 82.39% -0.07%
==========================================
Files 972 972
Lines 273057 272519 -538
==========================================
- Hits 225156 224538 -618
- Misses 47901 47981 +80
Flags with carried forward coverage won't be shown. Click here to find out more. |
3221bd7
to
4e25f54
Compare
rust/src/mpm_ac_rs.rs
Outdated
{ | ||
let haystack = build_slice!(data, data_len as usize); | ||
let mut match_cnt : u32 = 0; | ||
// array of bools for patterns we found |
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.
comment is wrong, it's used as a bitarray now
Updated numbers after setting "kind" to DFA based on BurntSushi/aho-corasick#136 (comment) Intel Xeon W-2245
So in open, this improves things from 28.2b to 16b ticks. AMD Threadripper 2990wx
Open: 22.7b -> 14.2b |
WARNING:
Pipeline 16764 |
Information: QA ran without warnings. Pipeline 16765 |
Direct DFA calls attempt has the following results Intel Xeon W-2245
So a small improvement over the last attempt. AMD Threadripper 2990wx
Also a small improvement, but still not where we'd hope things to land. |
Explicitly disabling the prefilter feature seems to have a minimal effect. |
WARNING:
Pipeline 16777 |
Information: QA ran without warnings. Pipeline 16779 |
Performance wasn't there to justify doing more work on this. |
replace #9904, includes #9908
Implement "ac-rs" using the aho-corasick Rust crate. Sadly, it doesn't give the performance I hoped for. Don't see more ways to optimize it.
Results
Intel Xeon E5-2680v4
HS almost 3x AC-RS, AC almost 2x AC-RS.
AMD Threadripper 2990wx
AC almost 2x
Intel Xeon W-2245
HS is 3x the perf, AC 2x.