simd_kernels/
config.rs

1// Copyright Peter Bower 2025. All Rights Reserved.
2// Licensed under Mozilla Public License (MPL) 2.0.
3
4// These parameters should rarely need adjustment.
5
6//! # **Configuration Constants** - *Runtime Behaviour Parameters*
7//!
8//! Global configuration constants controlling kernel behaviour and performance thresholds.
9//! These values are compile-time constants optimised for typical workloads.
10
11/// Maximum allowed repetitions for string multiplication operations.
12///
13/// Prevents excessive memory allocation when repeating strings through multiplication.
14/// Operations exceeding this limit will return an error rather than allocating unbounded memory.
15pub const STRING_MULTIPLICATION_LIMIT: usize = 1_000_000;
16
17/// Threshold for dictionary size checks in categorical array operations.
18///
19/// Controls when the `cmp_dict_in` function in `kernels/logical.rs` switches from dictionary
20/// lookups to direct string comparisons. Arrays with fewer unique values than this threshold
21/// use optimised dictionary-based comparisons.
22pub const MAX_DICT_CHECK: usize = 256;