I feel the need for garbage collection is a language design mis-feature. That is to say, producing garbage is a language design-mis-feature. To quote Bjarne Stroustrup: > I don't like garbage. I don't like littering. My ideal is to eliminate the > need for a garbage collector by not producing any garbage. That is now > possible. and it's indeed possible. For example It's become pretty much a non-issue in modern C++:…
The Garbage Collection Handbook, 2nd Edition
61–70 of 174 posts
Re: The Garbage Collection Handbook, 2nd Edition
#62Earlier quoted context omitted.
And since no implementation has ever supported it, it has been deprecated in ISO Ada 95 and further removed from it on ISO Ada 2012. https://en.wikibooks.org/wiki/Ada_Programming/Pragmas/Contro...
There was this project though. https://github.com/Roldak/AGC The best part is that it's faster than manual management. People will tell you they need do to malloc and free manually for performance, but when you actually run the numbers GC wins for a majority of use cases.
What papers are you referencing showing tracing GCs outperforming things? If it’s just the website, I think it’s an artifact of a micro benchmark rather than something that holds true for non trivial programs.
Re: The Garbage Collection Handbook, 2nd Edition
#63Earlier quoted context omitted.
And since no implementation has ever supported it, it has been deprecated in ISO Ada 95 and further removed from it on ISO Ada 2012. https://en.wikibooks.org/wiki/Ada_Programming/Pragmas/Contro...
There was this project though. https://github.com/Roldak/AGC The best part is that it's faster than manual management. People will tell you they need do to malloc and free manually for performance, but when you actually run the numbers GC wins for a majority of use cases.
Do you have a recommendation for reading?
Re: The Garbage Collection Handbook, 2nd Edition
#64Re: The Garbage Collection Handbook, 2nd Edition
#65Re: The Garbage Collection Handbook, 2nd Edition
#66Rust has left the building
Re: The Garbage Collection Handbook, 2nd Edition
#67I feel the need for garbage collection is a language design mis-feature. That is to say, producing garbage is a language design-mis-feature. To quote Bjarne Stroustrup: > I don't like garbage. I don't like littering. My ideal is to eliminate the > need for a garbage collector by not producing any garbage. That is now > possible. and it's indeed possible. For example It's become pretty much a non-issue in modern C++:…
Modern C++ has reference counting (“smart pointers”) and memory leaks instead, so YMMV.
Re: The Garbage Collection Handbook, 2nd Edition
#68What I really want out of a garbage collector is a "Collect" function with a deadline. Pick a max time it's allowed to run before stopping and returning to the program.
Re: The Garbage Collection Handbook, 2nd Edition
#69Earlier quoted context omitted.
There was this project though. https://github.com/Roldak/AGC The best part is that it's faster than manual management. People will tell you they need do to malloc and free manually for performance, but when you actually run the numbers GC wins for a majority of use cases.
Tracing garbage collectors don’t generally win against reference counting connectors, especially when those reference counts are automatically elided via ARC (eg swift and objective C) or because they’re rarely used by means of composition (c++ and rust). Additionally, different kinds of application strategies are better depending on the use case (eg a pool allocator that you bulk drop at the end of some computation)…
RC is used in lower level languages because it doesn’t require runtime support, and can be implemented as a library.
As I wrote in another comment, even with elisions, you are still trading off constant writes on the working thread for parallel work, and you even have to pay for synchronization in parallel contexts.
Re: The Garbage Collection Handbook, 2nd Edition
#70Earlier quoted context omitted.
Not really, here it is winning hands down over Swift's ARC implementation. https://github.com/ixy-languages/ixy-languages
Wasn't this the comparison that decided to use reference types for everything for no real reason?