mirror of
https://github.com/daeuniverse/dae.git
synced 2025-07-12 16:59:38 +07:00
optimize: even faster domain keyword matching
This commit is contained in:
@ -111,7 +111,7 @@ func (n *AhocorasickSlimtrie) MatchDomainBitmap(domain string) (bitmap []uint32)
|
||||
// Already matched.
|
||||
continue
|
||||
}
|
||||
if hits := n.ac[i].MatchThreadSafe([]byte(domain)); len(hits) > 0 {
|
||||
if n.ac[i].Contains([]byte(domain)) {
|
||||
bitmap[i/32] |= 1 << (i % 32)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user