(b *testing.B)
| 28 | } |
| 29 | |
| 30 | func BenchmarkStringEnd_NoEscape_Long(b *testing.B) { |
| 31 | // 128-byte string value, no escapes — exercises the SIMD fast path. |
| 32 | data := []byte(strings.Repeat("a", 128) + `"`) |
| 33 | b.SetBytes(int64(len(data))) |
| 34 | b.ResetTimer() |
| 35 | for i := 0; i < b.N; i++ { |
| 36 | _, _ = stringEnd(data) |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | func BenchmarkStringEnd_WithEscape(b *testing.B) { |
| 41 | // Slow path: contains an escaped quote so the per-byte walker runs. |
nothing calls this directly
no test coverage detected