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
When generating C++ code, using const ref is faster for arrays, records and large ints/bitvectors. (But it is probably slower for values that already fit in registers.)
Note that applying the same optimization for C code is, in principle, easy: "just add a star in front of the variable's name" but rapidly becomes tedious and error prone as we have to insert "&" in front of function arguments, convert function arguments to l-values, (optionally?) optimize "&*" when a function argument is passed further down the call graph and do the right thing in the foreign function interface.
So we will probably not try to optimize generated C code in this way.
The text was updated successfully, but these errors were encountered:
When generating C++ code, using const ref is faster for arrays, records and large ints/bitvectors. (But it is probably slower for values that already fit in registers.)
Note that applying the same optimization for C code is, in principle, easy: "just add a star in front of the variable's name" but rapidly becomes tedious and error prone as we have to insert "&" in front of function arguments, convert function arguments to l-values, (optionally?) optimize "&*" when a function argument is passed further down the call graph and do the right thing in the foreign function interface.
So we will probably not try to optimize generated C code in this way.
The text was updated successfully, but these errors were encountered: