Old Schoo Coding Style
Posted: Tue Feb 10, 2026 8:25 pm
I often see expressions like thiese in example code:
This was an old trick for getting compilers to save values in registers rather than re-evaluating the function each time.
Is this still suggested with the PB compiler? Or, is this just old-school style?
Which brings me to my point of the question: how optimizig is the compiler? With modern GCC/Clang/MSVC, "stupid" compiler tricks are no longer necessary. The compilers just know how to translate into the most efficient machine code, down to out-of-order execution.
Code: Select all
Event = Event()
EventWindow = EventWindow()
...
Is this still suggested with the PB compiler? Or, is this just old-school style?
Which brings me to my point of the question: how optimizig is the compiler? With modern GCC/Clang/MSVC, "stupid" compiler tricks are no longer necessary. The compilers just know how to translate into the most efficient machine code, down to out-of-order execution.