4 ms·
@nine_k shared this https://programming-language-benchmarks.vercel.app/wasm-vs-rust https://programming-language-benchmarks.vercel.app/wasm-vs-r... in the comme
by solomatov 4y ago
@nine_k shared this https://programming-language-benchmarks.vercel.app/wasm-vs-rust https://programming-language-benchmarks.vercel.app/wasm-vs-r... in the comment tree. The results are pretty bad. You could lose 2x or more in cpu perf. There're cases where wasm is pretty close to native though.
- dralley 4y agoI wouldn't call 50% loss "pretty bad". I mean sure, it's not great, but if you were to go from Rust to C# or Java you would most likely see a similar loss.
- kaba0 4y agoThat would depend on the type of code you write. Heavily allocating code can be very fast in case of the JVM, and you can’t always avoid dynamic allocations/arenas are not always a solution.
- naikrovek 4y agoyeah I have known about this for a while, but no one I've spoken to personally believes me. to them WASM is pure win and there are no downsides. when I mention performance, they kinda waffle a bit, saying "CPU is cheap" or something similar, and they start to show a hint of understanding when I say that cloud resources are billed by unit of CPU time, and by amount of RAM used. then I say that our mutual employer invokes lambdas hundreds of trillions of times per year and I think they briefly understand before being caught up in "new stuff is awesome" technology fetishism again. it's exhausting. everyone should live overseas for a couple years because it changes how you view the world... everyone should be a game developer for a couple years as well, because you will quickly notice just how unbelievably slow modern software is. more people need to see that. security is important! portability is important! other things are important, always, and when you gain a sense of just how slow software is today in comparison to how unbelievably fast modern hardware is, it becomes very hard for me to think positively of anything that lowers performance further for almost any reason.