get_cached_function_name

Function get_cached_function_name 

Source
pub fn get_cached_function_name(base: &str, suffix: &str) -> String
Expand description

Efficient function name construction with caching

Constructs function names like “bessel_j_indexed” and caches them to avoid repeated string allocations.

§Examples

use mathhook_core::parser::cache::get_cached_function_name;

let name1 = get_cached_function_name("bessel", "j_indexed");
let name2 = get_cached_function_name("bessel", "j_indexed");
// Second call reuses cached result

§Performance

  • First call: O(n) string construction + HashMap insertion
  • Subsequent calls: O(1) HashMap lookup + clone