2 ms·
There are also prefetch instructions. I listened to https://www.youtube.com/watch?v=SetLtBH43_U https://www.youtube.com/watch?v=SetLtBH43_U recently (transcript
by Jach 4y ago
There are also prefetch instructions. I listened to https://www.youtube.com/watch?v=SetLtBH43_U https://www.youtube.com/watch?v=SetLtBH43_U recently (transcript: https://signalsandthreads.com/memory-management/ https://signalsandthreads.com/memory-management/), part of it talked about some work in OCaml's GC.
> ...each individual memory request that’s not in cache still has to wait the full 300 cycles. But if we can get 10 of them going at the same time, then we can be hitting a new cache line every 30 cycles. I mean, that’s not as good as getting one every 16 cycles, but it’s close. You’re actually able to get to a reasonable fraction of the raw memory bandwidth of the machine while just traversing randomly over this huge one gigabyte heap
https://github.com/ocaml/ocaml/pull/10195 https://github.com/ocaml/ocaml/pull/10195 shows the change adding prefetching to the marking phase (https://github.com/ocaml/ocaml/pull/9934 https://github.com/ocaml/ocaml/pull/9934 was done earlier for sweeping). There are some benchmarks in the thread/linked from the thread.
- deleted 4y ago[deleted]