Milestone achieved! For Debian Code Search, I no longer need to use cgo to link ...

@zekjur@mas.to

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: michael.stapelberg.ch/posts/20

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