> I'm no authority here, but I believe a large (major?) part of the Cgo overhead is caused by scheduling overhead. As I understand it, a C function call is non-preemptible and the Go runtime don't know whether the call will block.
But that part would be handled by the C-compiler-that-knows-Go inserting the pre-emption points just like the Go compiler does into the generated code. Or the same checks for blocking. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/0ac6ac9e-ed99-4536-a8b0-44674f8b85a5n%40googlegroups.com.