- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for BenchmarkCompareStringSameLength (0.42 sec)
-
src/runtime/string_test.go
} } func BenchmarkCompareStringIdentical(b *testing.B) { s1 := "Hello Gophers!" s2 := s1 for i := 0; i < b.N; i++ { if s1 != s2 { b.Fatal("s1 != s2") } } } func BenchmarkCompareStringSameLength(b *testing.B) { s1 := "Hello Gophers!" s2 := "Hello, Gophers" for i := 0; i < b.N; i++ { if s1 == s2 { b.Fatal("s1 == s2") } } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Dec 13 14:05:23 UTC 2022 - 13.3K bytes - Viewed (0)