aboutsummaryrefslogtreecommitdiff
path: root/examples/example-argument-picker
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-08-20 03:38:10 +0800
committer魏曹先生 <1992414357@qq.com>2026-08-20 03:38:10 +0800
commit5678e0ba37ce2c5c8161f0d48505e7993967e30c (patch)
treee6035d2e8bf4139e634052fef8c0c48d4c97434a /examples/example-argument-picker
parentec9edc294fd5e7e29977fc7b0e6fb953422bc0e2 (diff)
feat: add dispatch strategy features with auto-selection and benchmark
support Add `dispatch_linear`, `dispatch_tree`, and `dispatch_phf` as mutually exclusive features for selecting the command dispatch strategy. When no strategy feature is enabled, an auto-selection heuristic picks the optimal strategy based on command table characteristics (size, name length, nesting depth). Add the `bench_support` feature to compile all three generators for the benchmark harness, and introduce `bench_cell!` to generate benchmark cells comparing strategies. The PHF generator uses a CHD minimal perfect hash for O(1) lookup independent of table size, while the trie generator was refactored to use a shared fallback method, keeping code size linear in table size.
Diffstat (limited to 'examples/example-argument-picker')
0 files changed, 0 insertions, 0 deletions