WebAssembly in the Linux Kernel, with Faster-Than-Native Performance
github.com
github.com
famous last words...
> faster than native
if you used a static compiled (and safe) language in-kernel i would assume that would be faster still than wasm or am i missing something...?
This is not exactly news.
A simple example is
log.debug(“foo:” + bar + “(“ + baz + ”)”)
A native C++ compiler would have to do the string concatenation and must call log.debug. A VM can (sometimes) detect that “log.debug” is a no-op, and skip computing its argument and calling it, and can even recover when “log.debug” stops being a no-op. It can even do that if the code for log get loaded dynamically at runtime.I guess they assume the WASM VM to be safe enough, that they can cut on system calls, which other user mode programs can't.
[1] https://www.destroyallsoftware.com/talks/the-birth-and-death...
But yes "faster than native" is not precise enough wording for this, should say "faster than conventional statically compiled C" or something.
Native -> user mode -> system calls -> slow
WASM -> kernel mode -> no-system calls -> fast
I guess, they can check what a WASM program is doing before they run it, so it doesn't have to be isolated outside of kernel mode.
So, bogus then.