(no title)
eigenspace | 2 days ago
Generally, the code ends up looking rather similar to non-GC languages. You create some buffers outside of your performance-sensitive parts, and then thread them through your code so they can be accessed and re-used in the hot loop or whatever.
It could be better, e.g. C++ and Rust both have some nice utilities for this stuff that are a bit hard to replicate in Julia, but it's not auch a huge difference, and there's also a lot of advantages on the julia side.
E.g. it's really nice to have the GC available for the non-performance critical parts of your code.
VorpalWay|2 days ago
Because from what I have seen in other GC languages, the answers to any of those questions haven't been great.
SatvikBeri|2 days ago
You can profile memory usage line by line in detail pretty easily with tools like @timeit or @btime
In practice I've found it pretty easy to get inner loops down to few or 0 allocations when needed for parallelization
eigenspace|2 days ago
There's static analysis tools that might be over-eager finding allocations, and there's also runtime measurement tools which should go into your test suite if it's of vital importance to monitor.
dandanua|2 days ago