Note
With this change it would be possible to support multibyte characters in alphabets if it was allowed by the spec.
Benchmark
$ time go test -bench=. -run=BenchmarkEncodeDecode -benchmem -cpuprofile profile.out
goos: linux
goarch: amd64
pkg: github.com/sqids/sqids-go
cpu: Intel(R) Core(TM) i7-10700T CPU @ 2.00GHz
BenchmarkEncodeDecode-16 30134 38607 ns/op 16648 B/op 132 allocs/op
PASS
ok github.com/sqids/sqids-go 1.711s
real 0m1.929s
user 0m1.971s
sys 0m0.183s
profile.out
andsqids-go.test
[]rune
instead ofstring
inEncode
/Decode
Benchmark