@prefetch
@prefetch
@prefetch(ptr: anytype, comptime options: PrefetchOptions) void
This builtin tells the compiler to emit a prefetch instruction if supported by the target CPU. If the target CPU does not support the requested prefetch instruction, this builtin is a no-op. This function has no effect on the behavior of the program, only on the performance characteristics.
The ptr argument may be any pointer type and determines the memory address to prefetch. This function does not dereference the pointer, it is perfectly legal to pass a pointer to invalid memory to this function and no illegal behavior will result.
PrefetchOptions can be found with @import("std").builtin.PrefetchOptions.
