Hacker News new | ask | show | jobs
by MaxBarraclough 21 days ago
> There is no possible way even in theory for a GC to outperform schedule-aware allocation from a fixed pool.

You mean in the absence of any reference-counting overhead? That doesn't sound like a fair comparison.

> In most cases the GC is just generic C++ code anyway; that indirection is unnecessary.

You can't use the JVM's GCs from C++. C++ heavily relies on RAII, so it doesn't seem like a good fit anyway. I'm not aware of any serious efforts at a high performance GC for C++.

As Herb Sutter points out, moving GCs require non-stable pointers, which C++ isn't suited to. [0]

> the schedulers require predictable execution at ~1µs granularity for throughput optimization purposes, which is difficult to guarantee in Java

Can't say I know much about that kind of issue, how does it work in C++ code?

[0] https://herbsutter.com/2011/10/25/garbage-collection-synopsi...