Improving Performance and Maintainability in Modern C++

By J Daniel Garcia

In this talk I will provide additional details on the article recently posted to "Improving performance and maintainability through refactoring in C++11" (please, see as well as updates on recent findings.

Abstraction based programming has been traditionally seen as an approach that improves software quality at the cost of losing performance. However, we explored the cost of abstraction by transforming an application of the PARSEC benchmark (namely fluidanimate application) from low-level, hand-optimized C to a higher-level and more general C++ version that is a more direct representation of the algorithms. We eliminated global variables and constants, used vectors of a user-defined particle type rather than arrays of built-in types, and separated the concurrency model from the application model. The result is a C++ program that is smaller, less complex, and measurably faster than the original.

The fluidanimate application was chosen to be representative of many applications and our transformations are systematic and based on principles. Consequently, our techniques can be used to improve the performance, flexibility, and maintainability of a large class of programs. The handling of concurrency issues has been collected into a small new library, YAPL.

Although the main focus of the talk will be the design principles and techniques that are generally applicable, we will also provide evaluation information on multiple architectures showing the impact on performance.