Skip to main content

cached_preliminary_surface_level

Function cached_preliminary_surface_level 

Source
fn cached_preliminary_surface_level<N: DimensionNoises>(
    noises: &N,
    cache: &mut N::ColumnCache,
    prelim_cache: &mut FxHashMap<(i32, i32), i32>,
    x: i32,
    z: i32,
) -> i32
Expand description

preliminary_surface_level with a per-quart-column result cache (vanilla’s Long2IntMap). On a hit it returns the memoized i32 and skips the expensive flat-router recompute in cache.ensure. Bit-identical: the cached value is the same deterministic function of the quart column.