Registry / utility / prefetch

prefetch

JSON →
library0.2.0rscratesunverified

A type-safe wrapper around LLVM's prefetch intrinsic for memory prefetching.

# Cargo.toml [dependencies] prefetch = "0.2.0"
INSTALL
IMPORT
SIG · PREFETCH
P
prefetch
utilityrustv0.2.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

prefetch
use prefetch::prefetch;

Prefetch a memory address to improve cache performance.

use prefetch::prefetch; fn main() { let data = [0u8; 1024]; unsafe { prefetch(&data[0], 0, 3); } println!("Prefetched"); }
Debug
Known issues
gotchaRequires nightly Rust and the `core_intrinsics` feature
fix
Use `#![feature(core_intrinsics)]` and compile with nightly
affects: >=0.2.0
Upgrade
Version history
0.2.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Amazon
1
Resources
prefetch — cargo add prefetch · libregistry