Registry / Library

library · v0.1.1
Cache Reuse Distance
Count distinct addresses since the previous identical reference to estimate LRU stack distance. A cold reference returns minus one.
Use Cache Reuse Distance
use vendor::cache_reuse_distance::cache_reuse_distance;
Run the example
nest demo cache_reuse_distance@0.1.1
blyxc native-run cache_reuse_distance-demo/main.blyx
Example source and expected output
use vendor::cache_reuse_distance::cache_reuse_distance;
fn main() {
println!(cache_reuse_distance([1,2,2,3,1],4));
}
Expected output
2
Published versions
| Version | Package | Source commit | SHA-256 |
|---|---|---|---|
| 0.1.1 | Download ZIP · Browse files | e2012ab3ec | c40764a803ba5a5096195dd8efe9f1a4294a0479a21df1c7e60256df22c07b30 |
| 0.1.0 | Download ZIP · Browse files | 6349f23784 | 0953d995a4a883fae3093c2b185c2484f690fd5169487677d904f7149dd30d6c |