buzz-language / buzz

👨‍🚀 buzz, A small/lightweight statically typed scripting language
https://buzz-lang.dev
MIT License
1.22k stars 34 forks source link

Ref counting vs GC #122

Open giann opened 1 year ago

giann commented 1 year ago

See if ref counting could be better than GC.

To avoid freeing too often, we could table the freeing for when a threshold of garbage is reached.

erlend-sh commented 1 year ago

Epic GC discussion on the similarly scoped Mun lang here: https://github.com/mun-lang/mun/issues/206

giann commented 1 year ago

Epic GC discussion on the similarly scoped Mun lang here: https://github.com/mun-lang/mun/issues/206

I like the idea of "running gc every frame". That could translate to running small sweep more often rather than potentially big sweeps depending on a threshold.