News for hackers. Stuff that matters.
Re:How to speed up the Rust compiler some more by TazeTSchnitzel on Wednesday November 23, 2016 @09:31AM (#13022858)
Is heap allocation actually unavoidable? PHP uses an arena allocator for its AST. I don't know how applicable that could be to Rust.
Re:How to speed up the Rust compiler some more by rkangel on Wednesday November 23, 2016 @11:26AM (#13023674)
There are plenty of things that could be used to speed up particular hotspots - arena allocators are one option.

Better than that is to not allocate at all, which is the focus of the effort here.

A step further down the line of optimisation may identify allocation hotspots and use custom allocation strategies rather than using the language default (the heap).

Re:How to speed up the Rust compiler some more by Manishearth on Wednesday November 23, 2016 @11:46AM (#13023809)
Rust uses an arena for the type graph as well. Note that jemalloc gets you a lot of the benefits of using an arena for free.
Re:How to speed up the Rust compiler some more by hackcrafter on Wednesday November 23, 2016 @11:04AM (#13023510)
Not that applicable.

Rust memory model around strong ownership and borrow-checking differs from the GC languages that can use generational strategies and lots of heap allocation re-use.

All languages are doing allocations to the OS, rust just doesn't have a GC like PHP does to intermediate.

Re:How to speed up the Rust compiler some more by TazeTSchnitzel on Thursday November 24, 2016 @09:27AM (#13030449)
PHP's compiler is written in C, and its AST isn't garbage-collected. I think we just throw out the entire arena, actually.
Re:How to speed up the Rust compiler some more by slededit on Friday November 25, 2016 @01:13AM (#13034680)
Technically its a very limited form of garbage collection... Then again with this definition so is just not free-ing anything and letting the OS cleanup after process exit.
Re:How to speed up the Rust compiler some more by TazeTSchnitzel on Friday November 25, 2016 @06:59PM (#13040829)
I believe it's manually freed.