3 ms·
I didn't try Crystal, but Nim is definitely on par with C. Actually you can use just plain (stack) objects and ptr object and you have no GC involved. Pass th
by mratsim 7y ago
I didn't try Crystal, but Nim is definitely on par with C.
Actually you can use just plain (stack) objects and ptr object and you have no GC involved.
Pass the flag -d:useMalloc (or just call your preferred allocator) and you have the full C experience and speed.
- leshow 7y agoMaybe, but libraries that you use in Nim will probably use the GC, so will many functions in the std library (I imagine). Additionally, the binary you ship will still probably include the runtime & GC. So it's not really fair to say it's on par with C/Rust, there's reasons to avoid GC besides just performance. Say you are writing an embedded application for example. I don't know any Nim, so correct me if I'm wrong.
- nimmer 7y ago> not really fair to say it's on par with C/Rust It is. The GC is inline, thread-local and can be run manually, disabled completely, or switched to the new owned reference.