Repository navigation
make STDEXEC_ATTRIBUTE dispatch on arity instead of recursing - #2605
Merged
ericniebler merged 1 commit intoDec 6, 2026
Merged
Conversation
STDEXEC_PP_FOR_EACH rescans its argument 256 times per use, and STDEXEC_ATTRIBUTE has ~670 uses. Dispatching on the argument count (0-4) halves the time to preprocess <stdexec/execution.hpp> (clang 0.35s -> 0.17s, GCC 0.55s -> 0.25s). Passing more than 4 attributes is a compile-time error. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
ericniebler
force-pushed
the
faster-stdexec-attribute-macro
branch
from
December 6, 2026 00:27
e2ded05 to
7f6e076
Compare
STDEXEC_ATTRIBUTE dispatch on arity instead of recursing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
STDEXEC_PP_FOR_EACHrescans its argument 256 times per use, andSTDEXEC_ATTRIBUTEhas ~670 uses. Dispatching on the argument count (0-4) halves the time to preprocess<stdexec/execution.hpp>(clang 0.35s -> 0.17s, GCC 0.55s -> 0.25s). Passing more than 4 attributes is a compile-time error.