Skip to main content

should_register

Function should_register 

Source
pub fn should_register(
    identifier: &str,
    occurrences: usize,
    next_id: usize,
) -> bool
Expand description

ROI-based decision: register only when total savings exceed the MAP entry cost. savings = occurrences * (tokens(ident) - tokens(short_id)) cost = tokens(ident) + tokens(short_id) + MAP_ENTRY_OVERHEAD