> There are no lifetime parameters anywhere in this codebase. Arena data is 'static.
Yeah ok, that's one way to be faster than a GC. Just don't bother deallocating at all
Discussion
> There are no lifetime parameters anywhere in this codebase. Arena data is 'static.
Yeah ok, that's one way to be faster than a GC. Just don't bother deallocating at all
@lambdageek so I guess whether this is a good or bad idea comes down to "is this application #![no_alloc]?"
@mcc context: https://github.com/oxc-project/tsrs/blob/main/docs/PORTING.md#memory-model-the-important-part
it's Cloudflare's "let's rewrite TS in Rust". So it's their wasm runtime's linear memory.
(Also to be fair, they do have some kind of arenas going, so it's not that everything is 'static. it's more like they say everything is static but periodically they blow away the arenas between phases I guess. Maybe the code explains it better than the doc)
@lambdageek That is interesting. I could imagine it working.
@lambdageek a thing I've noticed is this strategy actually *can* fail if it turns out your OS's VM page allocator is not fast or at some point stops being fast