-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
arch: arm64ARM64 specific (NEON, future)ARM64 specific (NEON, future)area: dfaLazy DFA, OnePass DFALazy DFA, OnePass DFAarea: literalLiteral extraction from ASTLiteral extraction from ASTarea: metaStrategy selection, engine orchestrationStrategy selection, engine orchestrationbench: vs-stdlibComparison with Go stdlib regexpComparison with Go stdlib regexpeffort: 8Very large, ~1 weekVery large, ~1 weekplatform: macosmacOS-specificmacOS-specificpriority: criticalRelease blocker, correctness regressionRelease blocker, correctness regressionstatus: confirmedVerified, ready for workVerified, ready for workstrategy: teddyTeddy SIMD multi-pattern prefilterTeddy SIMD multi-pattern prefiltertype: performanceSpeed/memory improvement or regressionSpeed/memory improvement or regression
Description
the benchmark cost 116.923s to finish, there is maybe a issue here:
func BenchmarkMatchStringCache_WithoutCache_coregex(b *testing.B) {
runtime.GOMAXPROCS(4)
var data = strings.Repeat("Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36", 8)
var re = coregex.MustCompile(`(?iU)\b(eval|system|exec|execute|passthru|shell_exec|phpinfo)\b`)
b.ReportAllocs()
b.ResetTimer()
b.RunParallel(func(pb *testing.PB) {
for pb.Next() {
_ = re.MatchString(data)
}
})
}result:
goos: darwin
goarch: arm64
pkg: [MY REPOSITORY]/internal/waf/utils
cpu: Apple M2 Max
BenchmarkMatchStringCache_WithoutCache_coregex-12 100 1148587620 ns/op 1737521223 B/op 1445 allocs/op
testing: BenchmarkMatchStringCache_WithoutCache_coregex-12 left GOMAXPROCS set to 4
PASS
ok github.com/[MY REPOSITORY]/internal/waf/utils 116.923s
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
arch: arm64ARM64 specific (NEON, future)ARM64 specific (NEON, future)area: dfaLazy DFA, OnePass DFALazy DFA, OnePass DFAarea: literalLiteral extraction from ASTLiteral extraction from ASTarea: metaStrategy selection, engine orchestrationStrategy selection, engine orchestrationbench: vs-stdlibComparison with Go stdlib regexpComparison with Go stdlib regexpeffort: 8Very large, ~1 weekVery large, ~1 weekplatform: macosmacOS-specificmacOS-specificpriority: criticalRelease blocker, correctness regressionRelease blocker, correctness regressionstatus: confirmedVerified, ready for workVerified, ready for workstrategy: teddyTeddy SIMD multi-pattern prefilterTeddy SIMD multi-pattern prefiltertype: performanceSpeed/memory improvement or regressionSpeed/memory improvement or regression