Re:Copying data is wasteful, mutating data is dangerous
by strictfp on Thursday January 09, 2020 @01:06PM
(#22003709)
Arena style allocation helps. You still get the allocations, but GC is cheap. IMO both Java and the CLR are in desperate need of multiple heaps with separate GCs to solve these problems. One big heap simply doesn't scale well. Erlang is the only example I know of that does this right. I know that the golang GC is low-latency, but I'm not familiar with if it can sustain high allocation rates.
[ Parent
| on HN ]
Re:Copying data is wasteful, mutating data is dangerous
by imtringued on Friday January 10, 2020 @05:56AM
(#22010088)
Ponylang does as well. I always wonder about why we can't have multiple heaps. The primary argument against GCs is the stop the world pause. Unrelated high throughput code can interfere with latency critical code and therefore you have to write the whole program as if it were latency critical.
Re:Copying data is wasteful, mutating data is dangerous
by lostcolony on Thursday January 09, 2020 @04:11PM
(#22005809)
Nope.
Golang still uses one global heap; it just allows for stack based allocation in situations it can do it (avoiding putting stuff on the global heap), so copies _can_ be cheap re: GC.
Re:Copying data is wasteful, mutating data is dangerous
by jen20 on Thursday January 09, 2020 @04:20PM
(#22005905)
The CLR also allows stack allocation, and many of the newer .NET Core libraries have been built with a focus on eliminating unnecessary allocations.
Re:Copying data is wasteful, mutating data is dangerous
by WorldMaker on Friday January 10, 2020 @04:58PM
(#22016052)
Some of the biggest of .NET Core's advances in stack allocation (and resulting performance boosts) likely won't make it into Unity until around the release of .NET 5, though. It should be interesting to see how Unity adapts when the tools show up.