From ee9fc72909350c0edd8da14b981a971d76d16631 Mon Sep 17 00:00:00 2001 From: Go101 <22589241+go101@users.noreply.github.com> Date: Mon, 24 May 2021 08:48:46 -0400 Subject: [PATCH] Updated SliceTricks (markdown) --- SliceTricks.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/SliceTricks.md b/SliceTricks.md index 71e2ab9e..360ab1d2 100644 --- a/SliceTricks.md +++ b/SliceTricks.md @@ -106,10 +106,10 @@ s[i] = x a = append(a[:i], append(b, a[i:]...)...) // The above one-line way copies a[i:] twice and -// might allocate at most twice. -// The following verbose way only allocates at -// most once and copy elements in a[i:] once. -// But as of Go toolchain 1.16, due to lacking of +// allocates at least once. +// The following verbose way only copy elements +// in a[i:] once and allocates at most once. +// But, as of Go toolchain 1.16, due to lacking of // optimizations to avoid elements clearing in the // "make" call, the verbose way is not always faster. //