r/ProgrammingLanguages • u/goat-luffy • Jul 04 '26
Does implementing GC makes languages slow?
https://github.com/berylangMonth ago, I created a team of 5 and started working on "Bery - The compiled programming language". By the end of June we have quite good working compiler (it's not complete yet). In Bery we have decided to add the automatic Garbage Collector so we choose the "Mark and Sweep" method for it in the Bery Runtime Environment (BRE).
Now as we are heading forward with adding OOP and Exception Handling, I notice some delays in the compilation of program.
So we are now at this point of discussion - should we remove it from compiler or let it be there.
I will looking forward for help regarding this. and btw these are some constraints we set -
unsigned int BERY_GC_ALLOC_THRESHHOLD = 1000;
size_t BERY_GC_HEAP_SIZE_THRESHHOLD = 4 * 1024 * 1024;
View all comments
Show parent comment
0
u/runningOverA Jul 05 '26
Checked those sophisticated collectors. Don't reduce the work load, rather these shift the load to another core. Apparently looks like it's taking less time, but total core-hour remains the same and hence the precentage.
"Do a half way trace and then pause" algos are no better in respect to this core-hour.
And generational collectors are only good if you can move pointers at run time.