优化代码

This commit is contained in:
GoEdgeLab
2024-05-11 09:23:54 +08:00
parent af44f06e75
commit cb7f156ed8
116 changed files with 175 additions and 161 deletions

View File

@@ -3,7 +3,7 @@
package runes_test
import (
"github.com/TeaOSLab/EdgeNode/internal/re"
"github.com/TeaOSLab/EdgeNode/internal/utils/re"
"github.com/TeaOSLab/EdgeNode/internal/utils/runes"
"github.com/iwind/TeaGo/assert"
"regexp"
@@ -136,7 +136,6 @@ func BenchmarkContainsAnyWordRunes(b *testing.B) {
})
}
func BenchmarkContainsAnyWord_Regexp(b *testing.B) {
runtime.GOMAXPROCS(4)
var reg = regexp.MustCompile("(?i)" + strings.ReplaceAll("python\npycurl\nhttp-client\nhttpclient\napachebench\nnethttp\nhttp_request\njava\nperl\nruby\nscrapy\nphp\nrust", "\n", "|"))