News for hackers. Stuff that matters.
Re:Changing the Rules of Rust by scottlamb on Sunday September 17, 2023 @05:21PM (#37549460)
Are you interpreting "GC every heap allocation" as "each heap allocation causes an entire cycle of GC"? That's...not what that phrase means.
Re:Changing the Rules of Rust by charcircuit on Sunday September 17, 2023 @05:25PM (#37549503)
Yes I am. Java's GC can stop the world at any safepoint. It isn't limited to when objects are allocated and it doesn't do it every time.
Re:Changing the Rules of Rust by scottlamb on Monday September 18, 2023 @11:44AM (#37557782)
I'm aware. A cycle per allocation would be absurdly expensive. "GC every heap allocation" actually means that every heap allocation is subject to garbage collection and has to be traversed on every cycle in which it's reachable. If the GC algorithm uses compaction and/or generations, it gets moved around too. That all has a cost.