Earlier quoted context omitted.
The benefits of the JVM still stand out to me personally. Run anywhere, generate machine code at run time most place, world class optimizing compiler, battle tested & ready to deploy, integration with existing code base for gradual rewrites, etc. Wasm is a good idea but it's going to need to reimplement a lot of existing code (optimizing + jit). Doable and maybe it will convince people to do what has been a great ide…
The JVM had many chances to realize that goal. Java applets, J2ME, etc. I’m not sure which particular issue really kept it from keeping mindshare. I don’t think the virtual machine itself was ever really the problem. Still, since the Java platform didn’t capture this use case of a general purpose abstract machine, it makes a whole lot of sense to develop something like WASM. It’s a much more neutral platform to build…
InNative: Run WebAssembly Outside the Sandbox at 95% Native Speed
51–60 of 96 posts
Re: InNative: Run WebAssembly Outside the Sandbox at 95% Native Speed
#52Re: InNative: Run WebAssembly Outside the Sandbox at 95% Native Speed
#53Alternatively: run native code at least 5% slower than before.
(The point being that 5% slowdown is a drop in the bucket compared to what we've already lost due to Intel's chip design problems. AIUI, HT is a 15-20% slowdown, and SE was another 20% slowdown.)
Re: InNative: Run WebAssembly Outside the Sandbox at 95% Native Speed
#54"We could break the stranglehold of i386 on the software industry and free developers to experiment with novel CPU architectures without having to worry about whether our favorite language compiles to it." WASM is equivalent to early 80s ISAs but with different opcodes. Native WASM would be most efficient.
Literally the whole point of WASM is fast, sandboxed code. It's not a language, it's an LLVM target. So why turn LLVM IR into a native binary? It's basically the same thing as "native wasm", whatever that would mean. "Native wasm" is just JITed bytecode. Either that, or you're turning it into a normal binary, in which case, why even use WASM?
It sure looks like a language to me, like some sort of assembly language.
https://webassembly.org/getting-started/advanced-tools/
https://developer.mozilla.org/en-US/docs/WebAssembly/Text_fo...
granted this is a textual representation (very useful in certain circumstances) but that is semantics. Having done plenty of assembly, I don't see a huge distinction here.
Re: InNative: Run WebAssembly Outside the Sandbox at 95% Native Speed
#55Earlier quoted context omitted.
“Statically validated” AFAIU means there are no runtime checks. E. g. WASM stack local variables and globals are statically validated. Compiler can translate loads and stores to locals and globals to simple movs. There are no additional runtime checks, no overhead. Unlike linear memory.
As far as I could parse that comment, it's saying that function calls are statically validated and that memory is linear. Not that all memory accesses can be statically validated.
Since OS/process virtual memory bound checking is handled by the hardware, the one time setup above will lock down WASM memory access to within the 64MB, without software runtime overheads.
This is exactly why WASM memory was picked to be linear (unlike virtual memory that can have holes in continuity)
Re: InNative: Run WebAssembly Outside the Sandbox at 95% Native Speed
#56WebAssembly on desktop and servers is maturing pretty rapidly! There are several backend interpreters already in Rust and Go (life). The native, compiled options are even faster, Fastly's Lucet compiler and runtime was one of the first to implement WASI ( https://wasi.dev/ ): https://www.fastly.com/blog/announcing-lucet-fastly-native-w... The differentiator for InNative seems to be the ability to bypass the sandbox a…
I'm wondering what's the point of compiling server side stuff in wasm? Unless I forgot something, all main server languages are rather portable already, either because they are interpreted (python, node, jvm...) or can be compiled to many targets (rust, go...).
Re: InNative: Run WebAssembly Outside the Sandbox at 95% Native Speed
#57"We could break the stranglehold of i386 on the software industry and free developers to experiment with novel CPU architectures without having to worry about whether our favorite language compiles to it." WASM is equivalent to early 80s ISAs but with different opcodes. Native WASM would be most efficient.
Re: InNative: Run WebAssembly Outside the Sandbox at 95% Native Speed
#58"Run a fast, sandboxed bytecode outside of the sandbox by compiling it into a binary" so just a binary. I'm not sure I understand why you would use wasm here. No one writes wasm; you compile to it (usually from llvm ir). Why couldn't you just go straight from llvm ir to a binary; skip the wasm? I suspect I'm missing something here, but it doesn't seem to make sense.
Re: InNative: Run WebAssembly Outside the Sandbox at 95% Native Speed
#59WebAssembly on desktop and servers is maturing pretty rapidly! There are several backend interpreters already in Rust and Go (life). The native, compiled options are even faster, Fastly's Lucet compiler and runtime was one of the first to implement WASI ( https://wasi.dev/ ): https://www.fastly.com/blog/announcing-lucet-fastly-native-w... The differentiator for InNative seems to be the ability to bypass the sandbox a…
I'm wondering what's the point of compiling server side stuff in wasm? Unless I forgot something, all main server languages are rather portable already, either because they are interpreted (python, node, jvm...) or can be compiled to many targets (rust, go...).
Rust and Go have support for many targets but not as many as other compilers (GCC), a coverage problem that can be fixed by using WASM as intermediate and porting a WASM Runtime to that architecture.
Something like Innative would also enable desktop applications to be independent of the OS and architecture. The same binary would run on x86_64 Windows, PowerPC Mac and ARMv8 Linux.
It's basically Java but you don't have to use Java to get all the good parts.
(Disclaimer: I know the main dev of innative and do some WASM work myself)
Re: InNative: Run WebAssembly Outside the Sandbox at 95% Native Speed
#60WebAssembly on desktop and servers is maturing pretty rapidly! There are several backend interpreters already in Rust and Go (life). The native, compiled options are even faster, Fastly's Lucet compiler and runtime was one of the first to implement WASI ( https://wasi.dev/ ): https://www.fastly.com/blog/announcing-lucet-fastly-native-w... The differentiator for InNative seems to be the ability to bypass the sandbox a…
I'm wondering what's the point of compiling server side stuff in wasm? Unless I forgot something, all main server languages are rather portable already, either because they are interpreted (python, node, jvm...) or can be compiled to many targets (rust, go...).
"WebAssembly’s 32-bit integer indexes break LLVM’s vectorization due to pointer aliasing. Once fixed-width SIMD instructions are added, native WebAssembly will close the gap entirely, because this vectorization analysis will have happened before the WebAssembly compilation step."