|
|
|
|
|
by pm90
2185 days ago
|
|
I struggle to see how composing into functions adds a runtime cost when using modern compilers; as others have pointed out the compiler will inline it if the function is only used once. This rationalization doesn’t make sense to me, especially for game engines which I assume are not limited to a release or 2 but are used to power multiple titles. If the software artifact is going to live for a long time, it’s probably worth the effort to make it easier to understand and test. |
|
Could this pattern result in code so slow the game won't work in development w/o high optimization flags, thus increasing compile time?