by DevelopingElk · 8mo ago · 0 comments
Have you tested this GCs performance? Sometimes a baby GC can be fast enough.
The current version of the collector also compacts the heap and moves values around. All conservatively discovered values get pinned.
[1] http://wingolog.org/archives/2023/02/07/whippet-towards-a-ne... and other related posts
> One way is to inform the garbage collector of the locations of all roots [...] implicitly, in the form of a side table generated by the compiler associating code locations with root locations.
I wonder if there's a way to get GCC to do this.
I haven't measured the performance. I would like to. I'm especially interested in comparing it with the current version of the collector. It is now capable of heap compaction which will be the subject of a future article. I'm also interested in knowing how big a problem the conservative part of the collector is. The C stack depth has been minimized significantly since I got rid of the recursive evaluator. I don't think it's a significant problem but I could be wrong.
I need to implement the compiler's profiling functions in lone. Documentation on the matter seems scarce. Not even sure if those instrumentation APIs are stable. I got away with not implementing the ASAN and stack protector since they added flags that make the compiler emit trapping instructions instead of function calls. Profiling is a lot more complex.