Posts Tagged ‘optimization’

Minimizing Code Bloat: Incorrect Inlining

This article is a continuation of Minimizing Code Bloat for Faster Builds and Smaller Executables. Earlier I talked about excessive inlining as a common cause of code bloat.  Excessive inlining is when code that shouldn’t be inlined is.  Today I’m going to look at a related problem, code that is declared as inlined but never […]

Minimizing Code Bloat: Static Allocations

This article is a continuation of Minimizing Code Bloat for Faster Builds and Smaller Executables. Static allocations are certainly the simplest and most predictable sources of code bloat.  Static allocations refer to data structures in a program for which storage is allocated for the entire duration of the application’s execution.   In C++ file, class, […]

Minimizing Code Bloat: Excessive Inlining

This article is a continuation of Minimizing Code Bloat for Faster Builds and Smaller Executables. When a function is inlined its code is, from the perspective of the compiler, replicated to every place where the function is called.  For very simple functions the inlined code can be smaller than the out-of-line function call, and the […]

Minimizing Code Bloat: Template Overspecialization

This article is a continuation of Minimizing Code Bloat for Faster Builds and Smaller Executables. Even in an engine that isn’t rife with template meta-programming, template overspecialization can be a major source of code bloat.  Very few programmers, in my experience, really think about what the compiler and linker are doing with the code they […]

Minimizing Code Bloat for Faster Builds and Smaller Executables

No matter how much code you have, somebody always wants more.  That’s certainly been the case with every game and every engine I’ve worked on.  My good friend Kyle, who has for years been tracking all sorts of wonderful statistics about the development of Despair Engine, recently announced that we’d surpassed 1.5 million lines of […]