exploring slice allocation types.
0

Configure Feed

Select the types of activity you want to include in your feed.

Go 100.0%
5 1 0

Clone this repository

https://tangled.org/gm0stache.eu/slicestudy https://tangled.org/did:plc:2jibybub7wn2cl5dsqbq76tc
git@tangled.org:gm0stache.eu/slicestudy git@tangled.org:did:plc:2jibybub7wn2cl5dsqbq76tc

For self-hosted knots, clone URLs may differ based on your setup.



readme.md

slicestudy#

slice init test#

just had to see for myself how stark the difference between different alloc and indexing options is. find the relevant file here.

append test#

manipulating slices affects the backing array and therefore all other slices pointing to the same backing array. find the relevant file here.

how to run#

regular unit tests#

  • go test ./...

benchmarks#

  • simple: go test -bench=.
  • multiple executions: go test -bench=. -count=10