Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var EnableAVX512 = true
EnableAVX512 may slow down CPU Clock (maybe not). TODO need more research: https://lemire.me/blog/2018/04/19/by-how-much-does-avx-512-slow-down-your-cpu-a-first-experiment/
Functions ¶
func Bytes ¶ added in v0.2.1
Bytes XORs the bytes in a and b into a destination slice. The source and destination may overlap.
Bytes returns the number of bytes encoded, which will be the minimum of len(dst), len(a), len(b).
func Bytes16 ¶ added in v0.2.1
func Bytes16(dst, a, b []byte)
Bytes16 XORs of packed 16 Bytes. The slice arguments a, b, dst's lengths are assumed to be at least 16, if not, Bytes16 will panic.
func Bytes16Align ¶ added in v0.4.1
func Bytes16Align(dst, a, b []byte)
Bytes16Align XORs of packed 16 Bytes. The slice arguments a, b, dst's lengths are assumed to be at least 16, if not, Bytes16 will panic.
func Bytes8 ¶ added in v0.2.1
func Bytes8(dst, a, b []byte)
Bytes8 XORs of 8 Bytes. The slice arguments a, b, dst's lengths are assumed to be at least 8, if not, Bytes8 will panic.
func Bytes8Align ¶ added in v0.4.1
func Bytes8Align(dst, a, b []byte)
Bytes8Align XORs of 8 Bytes. The slice arguments a, b, dst's lengths are assumed to be at least 8, if not, Bytes8 will panic.
func BytesA ¶ added in v0.3.1
func BytesA(dst, a, b []byte)
BytesA XORs the len(a) bytes in a and b into a destination slice. The destination should have enough space.
It's used for encoding small bytes slices (< dozens bytes), and the slices may not be aligned to 8 bytes or 16 bytes. If the length is big, it's better to use 'func Bytes(dst, a, b []byte)' instead for gain better performance.
func BytesB ¶ added in v0.3.1
func BytesB(dst, a, b []byte)
BytesB XORs the len(b) bytes in a and b into a destination slice. The destination should have enough space.
It's used for encoding small bytes slices (< dozens bytes), and the slices may not be aligned to 8 bytes or 16 bytes. If the length is big, it's better to use 'func Bytes(dst, a, b []byte)' instead for gain better performance.
Types ¶
This section is empty.