4 ms·
>Try doing C with a garbage collector ... it's very liberating. Doing that means that I lose some speed and I will have to wait for GC collection. Then why sh
by DeathArrow 2y ago
>Try doing C with a garbage collector ... it's very liberating.
Doing that means that I lose some speed and I will have to wait for GC collection.
Then why shouldn't I use C# which is more productive and has libraries and frameworks that comes with batteries included that help me build functionality fast.
I thought that one of the main points of using C is speed.
- brucehoult 2y agoEvery time I've tried it, adding GC to a C program makes it faster. It will increase the RAM usage by a bit, and exactly when pauses happen is less predictable (unless you explicitly trigger a GC in e.g. your main loop), and possibly individual pauses larger, but overall program execution time -- throughput -- increases. Malloc() and free() aren't free, and in particular free() does a lot more bookkeeping and takes more time than people realise.
- hexo 2y agoC# has disgusting code style. IWillNotReadCode where variable or (and thats even worse) function/method names LookLikeThis.