Milestone achieved! For Debian Code Search, I no longer need to use cgo to link in the AVX2-optimized TurboPFor C library that powers our index since 2019:
https://michael.stapelberg.ch/posts/2019-09-29-dcs-positional-turbopfor-index/Instead, thanks to Go 1.27’s SIMD support, I can use AVX2 (and AVX512) natively from Go :)
Turns out that upstream C TurboPFor does not use AVX512 yet, so my Go implementation is now *faster* than C (for our use-case) 😲
So, as of today, Debian Code Search is running with CGO_ENABLED=0 (and GOEXPERIMENT=simd GOAMD64=v3) 🎉
A blog post with more details is in the works, if you’re curious. Let me know if you run into any bugs.
#golang #debian #simd