4 ms·
actually its really _hard_ in go to make cpu bound control flow, state, and allocation. do goroutines have any notion of locality? i've been looking and haven't
by convolvatron 2y ago
actually its really _hard_ in go to make cpu bound control flow, state, and allocation. do goroutines have any notion of locality? i've been looking and haven't been able to find anything
- jeffbee 2y agoGo comes out of the box with sync.Pool
- dilyevsky 2y agoYou can pin the go routine to a current thread using[0] and then pin the thread to a core using[1] if that’s what’s you’re after [0] - https://pkg.go.dev/runtime#LockOSThread https://pkg.go.dev/runtime#LockOSThread [1] - https://pkg.go.dev/golang.org/x/sys/unix#SchedSetaffinity https://pkg.go.dev/golang.org/x/sys/unix#SchedSetaffinity