shredder icon indicating copy to clipboard operation
shredder copied to clipboard

Refactor the collector to use reference counting

Open Others opened this issue 3 years ago • 3 comments

This is around a ~4x speedup, but required a lot of code changes. In terms of public API, only AtomicGc has a significant diff. (The old API would still work, but the changes make it work more efficently with the new internals.)

Others avatar Nov 28 '21 23:11 Others

A 4x speed up on what?

jrmuizel avatar Nov 29 '21 14:11 jrmuizel

@jrmuizel a 4x speedup on the stress test I use to benchmark the collector: https://github.com/Others/shredder/blob/master/tests/stress.rs On my machine it goes from ~12 to ~3 seconds.

This benchmark kinda blows, and I've had an issue to create new ones for a while (#7). But I'm pretty sure that this new design is significantly better on a number of axises anyway, as it removes the dumb parts of the collector where we keep a list of every Gc in the program.

Others avatar Nov 30 '21 06:11 Others

See #74

Others avatar Dec 01 '21 00:12 Others