Hacker News new | ask | show | jobs
by gwbas1c 262 days ago
So basically you're trading lowering RAM consumption for higher CPU consumption?

FWIW: When I look at Azure costs, RAM tends to cost more than CPU. So the tradeoffs of using a "slower" memory manager might be justified.

1 comments

It depends on workload. It is difficult to quantify the trade offs without knowing that.

The problem is in languages like C#/Java almost everything is an allocation, so I don't really think reference counting would work well there. I suspect this is the reason PyPy doesn't use reference counting, it is a big slowdown for CPython. Reference counting really only works well in languages with low allocations. Go mostly gets away with a non-compacting mark-sweep collector because it has low level control that allows many things to sit on the stack (like Rust/C/C++, etc.).

C# is a lot better than Java on this front since they support stack allocated structs