3 ms·
Neat. Doesn't really change anything, except that you aren't required to manually manage memory but, practically speaking, you will end up manually managing mem
by staticassertion 8y ago
Neat. Doesn't really change anything, except that you aren't required to manually manage memory but, practically speaking, you will end up manually managing memory. Especially if you're choosing C for performance requirements.
- pmoriarty 8y agoNot necessarily. My first experience with the boehm-gc was a long time ago, when I was using a very performance-intensive AI library. As an experiment, I modified it to use the boehm-gc and, surprisingly, it actually became faster. I've since learned that such a speed improvement when manual memory management is replaced with the boehm-gc is not uncommon.
- monocasa 8y ago'Performance' isn't just raw averaged throughout, but often includes worse case latency. There's a lot of perf sensitive applications where a GC isn't a great fit.
- chaosite 8y agoThis is true, but a lot of those latency sensitive applications are hard latency requirements, where you have to do something in X time, but doing it faster than X isn't actually useful. There are realtime GCs that can meet these hard requirements.
- monocasa 8y agoThose hard real time GCs everytime I've seen them come with overall throughput compromises. Many times real time constraints and overall throughput aren't mutually exclusive. And even on the soft real time side, like rendering modern GUI, GC pauses causing frameskips (you have ~16ms to render each frame) makes your app look janky.
- staticassertion 8y agoTotally, that could absolutely be the case. But it probably won't be. The reality is that most C programs do use manual memory management, by a very wide margin.