5 ms·
> different yet practically replaceable garbage collection: RC, Mark & Sweep, Boehm, None, and a couple of deprecated ones The new ARC (automatic reference cou
by nimmer 6y ago
> different yet practically replaceable garbage collection: RC, Mark & Sweep, Boehm, None, and a couple of deprecated ones
The new ARC (automatic reference counting) and ORC are the most promising.
No runtime, no pauses, thread-safe, verified at compile-time.
- elcritch 6y agoAs the OP said, these releases were put out a bit ago. The Nim team has been working hard on squashing the bugs with the new ARC/ORC garbage collector. There's still bugs with ARC/ORC particularly with async. The main reason there's a lot of bugs with ARC is that it also makes heavy usage of move semantics similar to the new C++ `std::move` which can significantly improve GC performance vs traditional reference counting alone, but takes some tuning of the standard library to work properly. I've been eagerly following it as my company is using Nim embedded on the ESP32 -- primarily since, well, I don't care much for programming C/C++. With Nim I was able to write a JSON-RPC server in a few dozen lines and it compiles with only a few hundred kB for everything including nice error handling. My PR merged to bring experimental support for FreeRTOS/LwIP to Nim got merged into the devel branch today! If anyone wants to help out, check the Nim forums.
- pjmlp 6y agoThere are pauses indeed, hence why most RC in high performance contexts rely on background cleaning threads to avoid stop the world with deletion cascades.