3 ms·
The place where your language needs to interoperate with the outside world is in OS calls. The modern way to interact with an OS is to stick a request on a rin
by pencilguin 4y ago
The place where your language needs to interoperate with the outside world is in OS calls.
The modern way to interact with an OS is to stick a request on a ring buffer and get back a request ID, and (eventually) check the response ring for that ID to show up. Like in io_uring.
If your language is powerful enough, its OS library can encode that directly (without first marshalling arguments onto a stack that they must then be copied from) for minimal overhead.
You might also have an FFI thing so you can call out to libcurl, libzstd and libsqlite. (Do any others matter?) Again, if your language is expressive enough, you can avoid building up an argument list the usual way that must then be reorganized for what the foreign library wants.