Our great sponsors
-
ffi-overhead
comparing the c ffi (foreign function interface) overhead on various programming languages
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
Many languages manage to provide decent N:M threading and relatively cheap FFI though. Yes, there are tradeoffs, sure, but Go's FFI is way too expensive beyond reasonable limits, making calls to graphic api or any other such api too expensive.
I dunno about internal implementation, but Haskell manages to provide both very cheap and efficient green threads and cheap ffi.
This is mostly what I did with my kutil logging library (sorry, no good documentation on how to use it yet). So I can use the same API in all my code and then pick various backends per project in order to better unify the log. For example, in Kubernetes I can use klog as the backend. I also wrote my own "simple" backend that does everything that I personally want. I'm sure there are other similar libraries out there.
Relevant issue: https://github.com/golang/go/issues/42469