You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clang has the builtin function __can_pass_in_regs(type) which might be useful, but I don't know if there is a similar intrinsic for GCC or whether it is widely applicable.
Some embedded architectures, ABIs, message sizes, and compilers may benefit from passing messages by value rather than reference.
For example, in-order RISC processors that can pass the entire message struct by value in registers are a good candidate.
This saves storing the message to memory and retrieving it from memory for each callback.
Benchmarking pass-by-reference vs pass-by-value for an individual use case will still be useful to determine which option is better for that use case.
The text was updated successfully, but these errors were encountered: