CGO Performance In Go 1.21
(shane.ai)
from tedu to golang@programming.dev on 01 Sep 2023 22:18
https://azorius.net/g/golang@programming.dev/p/vHkk1Ch3cd94G86q8h-CGO-Performance-In-Go-121
from tedu to golang@programming.dev on 01 Sep 2023 22:18
https://azorius.net/g/golang@programming.dev/p/vHkk1Ch3cd94G86q8h-CGO-Performance-In-Go-121
Cgo calls take about 40ns, about the same time encoding/json takes to parse a single digit integer. On my 20 core machine Cgo call performance scales with core count up to about 16 cores, after which some known contention issues slow things down.
threaded - newest
.
That’s pretty decent. I’m not convinced about the 16 core limit though, the 12700H has 6 P-cores, 8 E-cores and 6 threads, totalling “20 cores”. Not the best chip to benchmark multicore workloads