3 ms·
I'm gonna take a guess they dedicate a core to GC (or something along these lines).
by dataflow 4y ago
I'm gonna take a guess they dedicate a core to GC (or something along these lines).
- viraptor 4y agoThat's not enough. Imagine a circular linked list. GC looks at an outside pointer to item A in it. Now another thread removes A from the list and moves the outside pointer to the next item. After that, GC would see all items in the list not referenced by anything (apart from the cycle).
- dataflow 4y agoYeah, I didn't say it was sufficient. I just said it's probably one of the things they do.
- mbrodersen 4y agoNo each thread does it’s own alloc/free. I reduce the locking to a minimum by using per-thread caching and memorisation. I had to implement that to make the code scale linearly with number of cores. Without per-thread caching it would only scale to about 3 cores. Now it scales very cleanly. Which is nice.