Hacker News new | past | comments | ask | show | jobs | submit login

SGCL introduces the `tracked_ptr` smart pointer, which is used similarly to `shared_ptr`. The collector doesn't move data, which makes it highly efficient and — perhaps surprisingly — more cache-friendly than moving GCs.



Based on what data?

Folks who make claims about the cache friendliness of copying GCs have millions of lines of credible test code that they’ve used to demonstrate that claim.


Compaction doesn't necessarily guarantee cache friendliness. While it does ensure contiguity, object layout can still be arbitrary. True cache performance often depends on the locality of similar objects — for example, memory pools are known for their cache efficiency. It's worth noting that Go deliberately avoids compaction, which suggests there's a trade-off at play.


I'm not saying that compaction guarantees cache friendliness.

I'm saying you have no evidence to suggest that not compacting is better for cache friendliness. You haven't presented such evidence.


As I mentioned earlier, take a look at the Golang. It's newer than Java, yet it uses a non-moving GC. Are you assuming its creators are intentionally making slower this language?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: