3 ms·
How is this better than compiling everything to WebAssembly and using V8 as your interpreter?
by zackbloom 9y ago
How is this better than compiling everything to WebAssembly and using V8 as your interpreter?
- kllrnohj 9y agoBecause WebAssembly is extremely limited? Unless you need to ship on the web, using WebAssembly is almost certainly a bad decision as it makes highly compromising tradeoffs that you don't need.
- abc_lisper 9y agoDidn't know about this. Can you point me to some references that list the tradeoffs?
- scriptproof 9y agoWebAssembly is a tool in work, supported by Google, Microsoft, Apple, etc... Currently it lacks a garbage collector, but this is planned. I would bet on wasm to be the holly graal in the future, more than anything else.
- discreteevent 9y agoWe'll one reason would be that it looks like it actually works with a lot of languages right now. Do we have any idea when ruby will work in V8? BTW. In my experience so far, when it comes to software - a bird in the hand is worth ten in the bush
- jashmatthews 9y agoMany optimizations need to be performed at a higher level, using language details. By compiling something to WebAssembly you lose all the ability to do that. For dynamic languages like JS you can’t actually make these optimizations AOT, which is why we JIT JS in the first place.
- tom_mellior 9y agoIt has GC. (As does V8, but it's not exposed to WebAssembly.)
- imtringued 9y agoWebAssembly is a low level portable bytecode. You still need to write the code in C++ or Rust to get performance benefits. GraalVM improves the performance of Ruby, Python, etc and also allows you to run C and C++ code in the same VM as a bonus with good performance. Unless you're using an intermediary bytecode like WebAssembly or JVM Bytecode you will also need to ship full sources with your C or C++ application.