3 ms·
What do you mean by imperative? Static control by the program?
by mhh__ 7y ago
What do you mean by imperative? Static control by the program?
- cryptonector 7y agoI'm guessing u/hinkley meant having an API for the cache, so a compiler could generate instructions to prefetch cache lines (and maybe even keep them hot) rather than depend on automatic (heuristic) cache management.
- Reelin 7y agoJust FYI, prefetch instructions are already a thing (at least on x86). At present they're only hints to the underlying heuristic system though. (https://www.felixcloutier.com/x86/prefetchh https://www.felixcloutier.com/x86/prefetchh) Cache-as-RAM is also a thing, and allows the sort of pinning you described. Pretty specialized use cases though. (https://stackoverflow.com/questions/41775371/what-use-is-the-invd-instruction https://stackoverflow.com/questions/41775371/what-use-is-the...)