just had to see for myself how stark the difference between different alloc and indexing options is. find the relevant file here.
manipulating slices affects the backing array and therefore all other slices pointing to the same backing array. find the relevant file here.
go test ./...
- simple:
go test -bench=. - multiple executions:
go test -bench=. -count=10