r/programminghumor • u/Bubbly_Rain7858 • Jun 13 '26
How to REALLY optimize code.
My friends, this is how you optimize code correctly.
96
Upvotes
r/programminghumor • u/Bubbly_Rain7858 • Jun 13 '26
My friends, this is how you optimize code correctly.
View all comments
Show parent comment
3
u/Puzzleheaded_Study17 Jun 13 '26
I think they were comparing it to directly passing the value (so non const and non ref). Alternatively, they might refer to the compiler being able to cache it more heavily and therefore not having to read from memory. Potentially also referring to the ability to directly pass an rvalue without needing to copy it into a variable.