Skip to content

Eliminate schema::make from cli::usage, cache flat Options, and peel CLI wrappers at compile time - #60

Closed
clockblocker wants to merge 1 commit into
cli-processor-bundlesfrom
cli-compile-time-and-cache
Closed

clockblocker wants to merge 1 commit into
cli-processor-bundlesfrom
cli-compile-time-and-cache

Conversation

@clockblocker

@clockblocker clockblocker commented Nov 27, 2026 •

Copy link
Copy Markdown
Owner

Pure compile-time, binary-size, and runtime performance refactor for rfl::cli (zero public API changes):

  • Replaces parsing::schema::make and to_generic in include/rfl/cli/usage.hpp with a direct compile-time UsageWalker over reflected fields
  • Caches internal::Options per <T, ProcessorsType> using flat sorted std::vectors and std::string_view binary search instead of rebuilding std::map tables on every call
  • Peels CLI metadata wrappers at compile time in options.hpp and usage.hpp to eliminate per-field template symbol bloat

Stacked on cli-processor-bundles (#53). Verified with ASan + UBSan across all CLI tests.

@clockblocker
clockblocker force-pushed the cli-compile-time-and-cache branch from cdefb0f to c26fc2d Compare November 27, 2026 07:26
@clockblocker
clockblocker changed the base branch from cli-value-name-and-multi-token to cli-processor-bundles November 27, 2026 07:26
@clockblocker

Copy link
Copy Markdown
Owner Author

Closing mega-PR: static Options cache is cut (0 ms benefit, static-destructor UB risk); the measured UsageWalker win (-63.8% to -87.5% .o size) folds cleanly into Wave 1b rfl::cli::usage (branch preserved).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant