3 ms·
Note: This is a month old, not sure why it was posted today - and both versions are minor bugfix versions. The next series, Nim 1.4, is going to bring speed, s
by beagle3 6y ago
Note: This is a month old, not sure why it was posted today - and both versions are minor bugfix versions.
The next series, Nim 1.4, is going to bring speed, size and predictability improvements as well as FFI that better matches e.g. Python's object life cycl. This is done by moving from the existing soft-real-time thread local mark-and-sweep collector (which works extremely well, but does impose some constraints) to a much smarter reference counting with optional cycle collector.
Nim is the only language I'm aware of with different yet practically replaceable garbage collection: RC, Mark & Sweep, Boehm, None, and a couple of deprecated ones. They all have pros/cons, but they all work well.
- 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.