in profiling/memory/inefficient.go [3:10]
func InefficientAppend(n int) []int { result := []int{} for i := 0; i < n; i++ { tmp := []int{i} // new slice created in each loop iteration result = append(result, tmp...) } return result }