5 ms·
To some degree you could use a GC only language to create a large pool (eg a numpy array) and "allocate" items in there with indices as pointers. Would cover so
by janto 5y ago
To some degree you could use a GC only language to create a large pool (eg a numpy array) and "allocate" items in there with indices as pointers. Would cover some of the use cases for manual memory management.
edit: scooped by a sibling comment! :) ah well, here's what you could use to structure objects in a numpy array https://numpy.org/doc/stable/user/basics.rec.html?highlight=structured%20arrays https://numpy.org/doc/stable/user/basics.rec.html?highlight=...
- secondaryacct 5y agoThat s what we do in low latency java in big banks, 3 GC per day, between 5 and 6 am, anything more and 10 people are profiling.
- kaba0 5y agoIs that truly a good idea in case of the JVM? Of course there will be problems where this is the correct approach, but in certain cases simply letting the very advanced GC do its job is actually faster.
- bobbylarrybobby 5y agoIt’s not about speed (throughout) but about latency. If the GC takes (say) several minutes during a period of downtime so that it doesn’t have to run at all during uptime, then it’s worth it.
- kaba0 5y agoWhat about ZGC then? If throughput is not the metric to optimize for, ZGC promises less than 1 ms pauses for up to TBs of heap size.
- pjmlp 5y agoJava suffers from Python 2 like syndrome with Java 8. Those shops aren't going to use ZGC. Nor they will profit from the several performance improvements, including the free JIT cache across runs with PGO data on Hotspot and J9, that used to be a commercial feature on third party JDKs.
- nextaccountic 5y agoWhat about a concurrent and parallel GC that doesn't stop the world?
- cratermoon 5y agoThe author of the article mentions that trick and links to https://blog.twitch.tv/en/2019/04/10/go-memory-ballast-how-i-learnt-to-stop-worrying-and-love-the-heap-26c2462549a2/ https://blog.twitch.tv/en/2019/04/10/go-memory-ballast-how-i...
- janto 5y agoThe link appears to be about tricking the GC into not triggering, by exploiting its threshold strategy.