mirror of
https://github.com/daeuniverse/dae.git
synced 2025-07-15 18:29:08 +07:00
optimize: memory occupation
This commit is contained in:
@ -195,14 +195,14 @@ func BenchmarkGoRegexpNfa(b *testing.B) {
|
||||
runBenchmark(b, nfa)
|
||||
}
|
||||
|
||||
func BenchmarkAhocorasick(b *testing.B) {
|
||||
func BenchmarkAhocorasickSuccinctset(b *testing.B) {
|
||||
b.StopTimer()
|
||||
logrus.SetLevel(logrus.WarnLevel)
|
||||
simulatedDomainSet, err := getDomain()
|
||||
if err != nil {
|
||||
b.Fatal(err)
|
||||
}
|
||||
ahocorasick := NewAhocorasick(consts.MaxMatchSetLen)
|
||||
ahocorasick := NewAhocorasickSuccinctset(consts.MaxMatchSetLen)
|
||||
for _, domains := range simulatedDomainSet {
|
||||
ahocorasick.AddSet(domains.RuleIndex, domains.Domains, domains.Key)
|
||||
}
|
||||
|
Reference in New Issue
Block a user