3 ms·
The quote - is this yet another issue caused by abysmal FFI overhead in Go?
by neonsunset 2y ago
The quote - is this yet another issue caused by abysmal FFI overhead in Go?
- tazjin 2y agoThere's nothing related to FFI calls in this quote.
- zer00eyz 2y agohttps://www.reddit.com/r/golang/comments/12nt2le/when_dealing_with_c_when_is_go_slow/ https://www.reddit.com/r/golang/comments/12nt2le/when_dealin... If your C doesn't fight the scheduler it isn't that bad.
- kbolino 2y agoGreat find! Specifically: On a goroutine not locked to an OS thread (the default), don't take more than 1 microsecond in a single C call. If you need to take longer in C, lock the goroutine to an OS thread (runtime.LockOSThread), but then don't do things in Go that would park that goroutine (time.Sleep, blocking channel read/write, etc).