mirror of
https://github.com/gin-gonic/gin.git
synced 2025-05-21 01:17:49 +08:00
use IndexByte replace Split to improve performance (#2500)
Co-authored-by: yonbiaoxiao <yonbiaoxiao@tencent.com> Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
@ -18,6 +18,12 @@ func init() {
|
||||
SetMode(TestMode)
|
||||
}
|
||||
|
||||
func BenchmarkParseAccept(b *testing.B) {
|
||||
for i := 0; i < b.N; i++ {
|
||||
parseAccept("text/html , application/xhtml+xml,application/xml;q=0.9, */* ;q=0.8")
|
||||
}
|
||||
}
|
||||
|
||||
type testStruct struct {
|
||||
T *testing.T
|
||||
}
|
||||
|
Reference in New Issue
Block a user