Blyx Nest Blyx language
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.

Source repository · Package JSON

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

VersionPackageSource commitSHA-256
0.1.1Download ZIP · Browse filese2012ab3ecc40764a803ba5a5096195dd8efe9f1a4294a0479a21df1c7e60256df22c07b30
0.1.0Download ZIP · Browse files6349f237840953d995a4a883fae3093c2b185c2484f690fd5169487677d904f7149dd30d6c