-1

I was trying to figure out if the boehm GC is slow or is it fast since it removes a lot of headaches associated with manual memory management in C, Although i could not come up with a benchmark that allocates enough memory to see the garbage collector pause.

Is there any benchmarks that prove C can still be fast while garbage collected?

I tried to allocate 100 mb worth of data using boehm but i could not find any performance issues due to my flawed benchmark since it would not free them in the time i expected it to do so.

PunchCake
  • 13
  • 4
  • I would suggest instead of magic to focus on careful C programming. C language was not designed to have managed memory management. I you do not want to care about memory management choose different language (c# for example) – 0___________ Aug 05 '23 at 17:23
  • 1
    *"I could not come up with a benchmark that allocates enough memory"*. Have you tried continually allocating and freeing blocks of memory in some kind of repeatable 'random' pattern for a significant length of time (such as several seconds)? – Weather Vane Aug 05 '23 at 17:26
  • The good thing on C is that you can choose your own GC. And Boehm is not optimal because it will not find everything that will need to be deallocated. I use my own GC in C. – Lee Aug 15 '23 at 08:12

0 Answers0