Skip to content

efficiency: pass empty tags and state ids by value - #746

Open
infn-ke wants to merge 1 commit into
boost-ext:masterfrom
infn-ke:kenth/pass_by_value
Open

infn-ke wants to merge 1 commit into
boost-ext:masterfrom
infn-ke:kenth/pass_by_value

Conversation

@infn-ke

@infn-ke infn-ke commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

call<>::execute_impl, policies::log_*, and update_current_state took empty tags and SM::state_t by const reference, forcing callers to materialize stack temporaries when not inlined. Pass these internal parameters by value (empty classes or 1-2 byte integers).

Clang 19.1.7, -Oz, -mcpu=cortex-a53 (three-region SM): instantiating TU shrank by 2.85 KiB; no code-size change at -Os/-O2.

call<>::execute_impl, policies::log_*, and update_current_state took
empty tags and SM::state_t by const reference, forcing callers to
materialize stack temporaries when not inlined. Pass these internal
parameters by value (empty classes or 1-2 byte integers).

Clang 19.1.7, -Oz, -mcpu=cortex-a53 (three-region SM): instantiating
TU shrank by 2.85 KiB; no code-size change at -Os/-O2.

This branch has not been deployed

No deployments
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