4 ms·
Yeah, reference counting is reasonably fast(and FWIW C++/Rust have good support for it as well) however the one caveat(no cycle tracking) is pretty huge. If you
by vvanders 10y ago
Yeah, reference counting is reasonably fast(and FWIW C++/Rust have good support for it as well) however the one caveat(no cycle tracking) is pretty huge. If you don't have really good tools they're an absolute bear to track down.
Personally my go-to solution where I need the flexibility of GC is Lua. It's light-weight, stupid fast for what it is(thanks to LuaJIT). You can also constrain it really easy and running multiple instances is very well supported. If you partition your problem space right you can keep each domain small and thus your root set doesn't grow like it does in JS/UnrealScript/etc. There's actually a lot of parallels with Erlang's root-per-process GC and it.
Oh and it's also stupid-easy to drop into any C codebase.