3 ms·
Why in the world would you compile to wasm and make your code slower instead of just compiling to native code? To your example: you don't need nginx to talk to
by bastawhiz 2y ago
Why in the world would you compile to wasm and make your code slower instead of just compiling to native code? To your example: you don't need nginx to talk to wasm, it already talks to your code running on a local socket.
The only reason for wasm is portability. If you can't compile your code for the server you're going to be running it on, then the original argument of choosing wasm over JavaScript is already moot.
- peutetre 2y ago> instead of just compiling to native code? Because the managed service you signed up to doesn't offer that to you. They like WebAssembly modules because it's a sandboxed runtime.
- bastawhiz 2y agoIt's an awfully silly choice to use a managed service that only offers JavaScript and wasm if you don't want to use JavaScript and you care enough about performance that you're willing to accept the fairly meager benefits of wasm over JS. The real reason you'd choose wasm in this case is "I don't want to use JavaScript and I'm otherwise forced to use this service".
- peutetre 2y agoOr the price is right. Come on down! Use WebAssembly. You'll love it.
- jart 2y agoUse Plinko https://github.com/jart/cosmopolitan/tree/master/tool/plinko https://github.com/jart/cosmopolitan/tree/master/tool/plinko Back in the 1980s it was my greatest ambition to go on The Price Is Right and play Plinko. However all I could accomplish was making this cursed programming language instead. You'll love it.