nederlang icon indicating copy to clipboard operation
nederlang copied to clipboard

Run the GC on function return and remove GC Header from Objects

Open lpereira opened this issue 1 year ago • 2 comments

I was reading your blog post about Nederlang, specifically the one where you convert it from C and optimize it, and while playing with over the weekend it I found a way to make the GC a bit more efficient.

By using a bitvec::BitVec to mark reachable objects instead of the Header in every Object, I was able to make things quite a bit more efficient. Each commit have details.

lpereira avatar Apr 02 '24 00:04 lpereira

That looks awesome @lpereira - I'm hoping to be able to take a closer look some time next week.

dannyvankooten avatar Apr 06 '24 11:04 dannyvankooten

No rush! I ended up pushing some new changes after I sent the PR, further simplifying some things (i.e. the collection step is a lot nicer now!). I don't think I'll be making any other changes in this PR, though.

lpereira avatar Apr 28 '24 21:04 lpereira

So I finally had some time; although my Rust was once again quite rusty (ba dum tss) after a year of solely working in C and C++... But, this is very clever! Thanks for sharing that improvement here. :pray:

dannyvankooten avatar May 29 '24 08:05 dannyvankooten