4 ms·
This is a good approach but can be tricky. E.g. what if your thread spends a lot of time in a tight loop, e.g. doing a big inlined matmul kernel? Since you neve
by achierius 2y ago
This is a good approach but can be tricky.
E.g. what if your thread spends a lot of time in a tight loop, e.g. doing a big inlined matmul kernel? Since you never hit a function call you don't get safepoints that way -- you can add them to the back-edge of every loop, but that can be a bit unappetizing from a performance perspective.
- deleted 2y ago[deleted]
- chipsa 2y agoIf you don’t create any GC-able objects in the loop, why would you need to call the GC? And if you are, that should involve a function call. And if you do need to call the GC, you could manually insert function calls every x loop iterations.