Skip to main content

prefetch

Function prefetch 

Source
pub fn prefetch<T>(ptr: *const T)
Expand description

Hint the CPU to start loading the cache line holding ptr, without waiting for it. A prefetch never faults and has no architectural effect, so ptr may be dangling or out of bounds. A no-op on targets other than x86_64 and aarch64, and under Miri.