はじめに Go の tip に strings.Cut が入ったのでベンチマークを取った。ちなみに strings.Cut は lhs, rhs, ok := strings.Cut("FooBarBaz", "Bar") // lhs: Foo // rhs: Baz // ok: true package main_test import ( "strings" "testing" ) func BenchmarkCut(b *testing.B) { s := "FooBarBaz" b.ResetTimer() for i := 0; i < b.N; i++ { lhs, rhs, ok := strings.Cut(s, "Bar") if !ok || lhs != "Foo" || rhs != "Baz" { b.Fatal("bad!") } } } func Benc