base64x
base64x copied to clipboard
High performance drop-in replacement of the `encoding/base64` library
base64x library won't work with ARM64bit processors such as Apple M2 chips because the code for ARM64 bit to encode and decode is missing.
``` module github.com/bytedance/sonic go 1.16 require ( github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d github.com/chenzhuoyu/iasm v0.9.0 github.com/davecgh/go-spew v1.1.1 github.com/klauspost/cpuid/v2 v2.0.9 github.com/stretchr/testify v1.8.1 github.com/twitchyliquid64/golang-asm v0.15.1 golang.org/x/arch v0.0.0-20210923205945-b76863e36670 ) ```
sonic arm64 依赖 MBP M1 2020 benchmark go1.18.2 源码只用了 avx, 没法通过 sse2neon 自动转换,所以对比不是很明显。。 ``` === RUN TestEncoder --- PASS: TestEncoder (0.00s) === RUN TestDecoder --- PASS: TestDecoder (0.00s) === RUN...