From ee89d2a5da9c8eb61ece0b6f82d01f83c0161111 Mon Sep 17 00:00:00 2001 From: RW Date: Mon, 12 Feb 2024 08:37:52 +0100 Subject: [PATCH] Update convert.go --- convert.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/convert.go b/convert.go index 27828ec..c5460c1 100644 --- a/convert.go +++ b/convert.go @@ -17,7 +17,7 @@ import ( // UnsafeString returns a string pointer without allocation func UnsafeString(b []byte) string { // the new way is slower `return unsafe.String(unsafe.SliceData(b), len(b))` - // unsafe.Pointer variant: 0.5410 ns/op vs unsafe.String variant: 0.3538 ns/op + // unsafe.Pointer variant: 0.3538 ns/op vs unsafe.String variant: 0.5410 ns/op return *(*string)(unsafe.Pointer(&b)) }