Replies: 4 comments
-
Please correct me if I'm wrong, but as I understand it, this optimization is about potentially saving stack space? Is there any other benefit? |
Beta Was this translation helpful? Give feedback.
-
Don't allocate stack space at all in case string_view/etc? I think better to just try to measure. Unfortunately build absl benchmarks didn't work for me for some reason that I already don't remember. |
Beta Was this translation helpful? Give feedback.
-
I think the benefit from saving stack space is minimal, and it also has a small code complexity cost. You still have to bump the stack pointer, the only difference is by how much. I'm not going to try to measure this, but if someone finds a real benefit, let us know. |
Beta Was this translation helpful? Give feedback.
-
Thanks MBkkt and derekmauro I measured this a couple of months ago and there was no noticeable difference for the reasons Derek pointed out (neither cpu nor binary size). Additionally, it is hard to make a change to
|
Beta Was this translation helpful? Give feedback.
-
Few notes:
Digits
should be different size for different types of argumentsBeta Was this translation helpful? Give feedback.
All reactions