package bytealg
Import Path
github.com/parquet-go/parquet-go/internal/bytealg (on go.dev)
Dependency Relation
imports one package, and imported by 2 packages
Involved Source Files
broadcast_amd64.go
Package bytealg contains optimized algorithms operating on byte slices.
bytealg_amd64.go
count_amd64.go
broadcast_amd64.s
count_amd64.s
Package-Level Functions (total 2)
Broadcast writes the src value to all bytes of dst.
This function is similar to using the standard bytes.Count function with a
one-byte separator. However, the implementation makes use of AVX-512 when
possible, which yields measurable throughput improvements:
name old time/op new time/op delta
CountByte 82.5ns ± 0% 43.9ns ± 0% -46.74% (p=0.000 n=10+10)
name old speed new speed delta
CountByte 49.6GB/s ± 0% 93.2GB/s ± 0% +87.74% (p=0.000 n=10+10)
On systems that do not have AVX-512, the AVX2 version of the code is also
optimized to make use of multiple register lanes, which gives a bit better
throughput than the standard library function:
name old time/op new time/op delta
CountByte 82.5ns ± 0% 61.0ns ± 0% -26.04% (p=0.000 n=10+10)
name old speed new speed delta
CountByte 49.6GB/s ± 0% 67.1GB/s ± 0% +35.21% (p=0.000 n=10+10)
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |