soa

package
v0.11.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 4, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Allocate

func Allocate[T any]() (t []T)

Allocate creates a new slice s by using a total size of a page size. The length and capacity is set to "page size / size of type".

func Grow

func Grow[T any](src []T) (out []T)

Grow appends a new page of values to a given slice src and save it as a new slice dst.

func Pack

func Pack[T any](src []T) (dst []T)

Pack shrinks the slice s to a total amount of values which are not zero (0). The order of the elements remains the same.

func Unpack

func Unpack[T any](src []T) (dst []T)

Unpack grows the slice s to the next multiple of page size.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL