4 ms·
Go’s GC works well because it has stack allocated types, which Java doesn’t and pays a very heavy penalty for.
by AlphaSite 4y ago
Go’s GC works well because it has stack allocated types, which Java doesn’t and pays a very heavy penalty for.
- astrange 4y ago“Stack allocated” types wouldn’t be a concept at the Java language level, what it’s missing is value types. This has way worse issues than performance, because reference types are unnecessarily mutable and cause lots of bugs. Theoretically it can recover stack allocations with escape analysis though.