4 ms·
It doesn't compile Ruby code to wasm code, it compiles the Ruby interpreter to wasm, so it'll be roughly the same performance as as the Ruby interpreter on Wind
by Mikeb85 5y ago
It doesn't compile Ruby code to wasm code, it compiles the Ruby interpreter to wasm, so it'll be roughly the same performance as as the Ruby interpreter on Windows or Linux.
Also Rails is plenty quick these days, tons of people running it at massive scale.
- the_duke 5y agoThe best case WASM performance is roughly 20-50% slower than native code, depending on the runtime and the type of code executed. In the browser you have to also factor in the warmup time. I'd imagine an interpreter will suffer a lot because certain C tricks like computed goto don't work directly. (This will hopefully be improved by future Wasm proposals) (Note: that's still plenty fast enough for most use cases, and performance will improve)
- titzer 5y ago> The best case WASM performance is roughly 20-50% slower It's more accurate to say that the average case is 20-50% slower. The best case is on par, or slightly faster than native code[1]. [1] Measurements from our original paper, https://dl.acm.org/doi/10.1145/3062341.3062363 https://dl.acm.org/doi/10.1145/3062341.3062363 Engines are even faster now.
- bpicolo 5y agoIt’s not comparatively quick, but you don’t necessarily need quick to scale or be successful