Repository navigation
Conversation
invokeProcess walked all members of the task seven times per process function to bind partitions and grouped combinations, instantiating the binding lambdas for every member, although only those two kinds act on them; for everything else the calls are empty overloads. Select the partitions and combination generators once per task type, with a named selector so that the full member walk is shared by all process functions, and run the binding lambdas over those only. The calls that do something happen in the same order as before. StructToTuple gains apply_refs_tuple_cat_sized, a member walk whose callable returns a tuple per member, concatenated into one. Full -O2 compile, Apple clang 21, before -> after: - femtoUniverseProducerTask: 66.5 s -> 58.4 s (macro path, as for GCC 14), 67.6 s -> 58.7 s (structured binding packs) - dataCreatorCharmResoToDstarReduced: 44.6 s -> 41.7 s - derivedDataWriter: 79.9 s -> 74.8 s In femtoUniverseProducerTask the instantiation of the member walks goes from 5.9 s to 1.4 s.
Member
Author
|
@aalkin apparently selecting the bindables upfront avoids instanciating the large types at each invokation (for some 5% speedup while building O2Physics). |
Member
|
This is similar to what we have seen with the other pack operations, since it is always combinatorics. For iterating on the preselected tasks members and methods we need C++26 to properly fix this. |
This branch has not been deployed
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.
invokeProcess walked all members of the task seven times per process
function to bind partitions and grouped combinations, instantiating the
binding lambdas for every member, although only those two kinds act on
them; for everything else the calls are empty overloads. Select the
partitions and combination generators once per task type, with a named
selector so that the full member walk is shared by all process
functions, and run the binding lambdas over those only. The calls that
do something happen in the same order as before.
StructToTuple gains apply_refs_tuple_cat_sized, a member walk whose
callable returns a tuple per member, concatenated into one.
Full -O2 compile, Apple clang 21, before -> after:
GCC 14), 67.6 s -> 58.7 s (structured binding packs)
In femtoUniverseProducerTask the instantiation of the member walks goes
from 5.9 s to 1.4 s.