MCPcopy
hub / github.com/redis/go-redis / BenchmarkToLowerInternal

Function BenchmarkToLowerInternal

internal/util_test.go:21–26  ·  view source on GitHub ↗

util.ToLower is 3x faster than strings.ToLower.

(b *testing.B)

Source from the content-addressed store, hash-verified

19
20// util.ToLower is 3x faster than strings.ToLower.
21func BenchmarkToLowerInternal(b *testing.B) {
22 str := "AaBbCcDdEeFfGgHhIiJjKk"
23 for i := 0; i < b.N; i++ {
24 _ = ToLower(str)
25 }
26}
27
28func TestToLower(t *testing.T) {
29 It("toLower", func() {

Callers

nothing calls this directly

Calls 1

ToLowerFunction · 0.85

Tested by

no test coverage detected