Re:Moving from TypeScript to Rust / WebAssembly
by unrealhoang on Thursday July 09, 2020 @06:26AM
(#23778676)
Modern allocators (jemalloc, mimalloc) do pooling optimization just as well as GC.
The point of non-GC language is usually about pointing directly to the source data instead of copy and having value type that nicely fit together in the same memory page instead of jumping around in heap space.
I know JIT can do all that, but reliably? We'd need Sufficiently Smart Compiler.
Also, async itself doesn't magically make code run faster (on the contrary), it just lets you (ideally) do something else instead of waiting for a blocking operation to complete, or at least give you the illusion of sequential control flow (unlike nested callbacks).