| ▲ | zerr 3 days ago |
| If you care about performance at that level, you should not be using Java or any other language with a GC. |
|
| ▲ | pron 3 days ago | parent | next [-] |
| Modern tracing-moving GCs offer very efficient memory management algorithms that are often hard to beat on performance. Their price isn't so much performance anymore as memory footprint, while manual memory management (and refcounting GCs) optimise not for performance but for footprint (often at the cost of performance). Even this tradeoff is often misunderstood, as covered by this brilliant keynote from the most recent International Symposium on Memory Management: https://youtu.be/mLNFVNXbw7I |
|
| ▲ | arnold_palmur 21 hours ago | parent | prev | next [-] |
| In my opinion this is a very outdated opinion. |
|
| ▲ | pjmlp 3 days ago | parent | prev | next [-] |
| Thankfully not everyone agrees. https://www.ptc.com/en/products/developer-tools/perc We have already have had enough from anti-GC cargo cult from "manual memory management is great" folks. Having a GC (which RC is also an algorithm subset), doesn't preclude having other features. |
| |
| ▲ | creata 2 days ago | parent | next [-] | | Are there any public benchmarks for Perc? Or any hints as to what's going on inside? | |
| ▲ | OtomotO 3 days ago | parent | prev [-] | | There is also non manual, non GCed manual management. I agree that a GC can be a viable implementation of memory management though. | | |
| ▲ | pjmlp 3 days ago | parent [-] | | There isn't such thing, if you mean Rust, affine types systems require tree structures and have issues with multiple scopes, hence the memes with borrow checker. Which I would refer as compiler assisted, although not really a proper term. There is a reason outside Rust, everyone else is string to combine GC alongside affine/linear/effects/dependent types instead of one solution for everything. The productivity of having a GC, with the type system capabilities to go lower level, when the profiler says so. Although I have to conceded, Rust made a great job bringing ATS and Cyclone ideas into mainstream. Additionally with AI powered languages, naturally most of this will be automated anyway. | | |
| ▲ | 2 days ago | parent | next [-] | | [deleted] | |
| ▲ | OtomotO 3 days ago | parent | prev [-] | | Ref counting is also no GC by the definition of a GC I was brought up with. But yes, I was also thinking about the borrow checker. Not necessarily in Rust, as other languages start to adopt similar techniques. | | |
| ▲ | shakna 3 days ago | parent | next [-] | | Maybe not how you were brought up, and people argue... But Watson & Watson, back in '87, described ref counting as "An efficient garbage collection scheme for parallel computer architectures". Even the dragon book refers to ref counting as a form of garbage collection. Line 2 of Ref counting's Wikipedia page refers to garbage collection. People have argued since the invention in 1960, but... Ref counting is one form of GC. [0] It might not be a tracing GC, but it is GC. [0] https://dl.acm.org/doi/10.1145/367487.367501 | |
| ▲ | pron 3 days ago | parent | prev | next [-] | | As refcounting and tracing are the two primary starting points for garbage collection, they're its two pillars so to speak (e.g. https://web.eecs.umich.edu/~weimerw/2012-4610/reading/bacon-...), I don't know of any serious person in the memory management space who doesn't see refcounting as a GC, although some languages with a refcounting GC say "they don't have a GC" in their marketing material. As a general rule, tracing seeks to optimise for throughput while refcounting seeks to optimise for footprint, although the two can become more elaborate and converge (as shown in the paper I linked). | |
| ▲ | pjmlp 3 days ago | parent | prev | next [-] | | Then somehow someone has taught you badly, any proper CS reference book in academia has it, like the famous GC Handbook, https://gchandbook.org/ The other languages adopting such type systems, also keep automatic resource management around for productivity. The ones that don't, are still in the looking for meaningful adoption stage. | |
| ▲ | vips7L 3 days ago | parent | prev [-] | | Most academic definitions of garbage collection include reference counting. It’s just a form of it. https://gchandbook.org/contents.html |
|
|
|
|
|
| ▲ | mark_l_watson 3 days ago | parent | prev [-] |
| There are ways to mitigate this, the fly weight pattern, etc. |