Overview
ISO/IEC TR 18015:2006 - Technical Report on C++ Performance - is a guidance document from ISO that analyzes the time and space overheads of C++ language and library features and provides techniques for writing and implementing efficient C++ code. The report explains the principle of “zero overhead” and shows how to use C++ in performance-critical contexts, with special emphasis on embedded systems, predictability, and hardware interfacing.
Key Topics
- Performance model: a framework for understanding run-time overhead, code size, and memory footprint implied by C++ features.
- Language features: analysis of namespaces, type conversions, classes and inheritance (including virtual functions and RTTI), exception handling, and templates - covering their time/space costs and optimization strategies.
- Libraries and IOStreams: techniques for creating efficient libraries, with a focused discussion on optimizing IOStreams and Locales.
- Embedded systems: guidance on ROMability, predictability, and memory-constrained programming patterns.
- Hardware interfaces: standardized interfaces and examples for low-level access - notably the **** C/C++ interface and the **** C++ interface, including implementation and usage guidance.
- Measurement and benchmarking: annexes describing timing methodologies, benchmarks (abstraction penalty, function-object vs function-pointer comparisons), and best practices for measuring overhead.
- Implementation guidance: tips for compiler and library implementers to yield efficient code and avoid code bloat from templates or unnecessary instantiations.
Applications
- Designing high-performance server and numerical applications where execution speed and memory footprint matter.
- Developing embedded systems with tight ROM/RAM budgets or real-time constraints where predictability and ROMability are required.
- Implementing or optimizing C++ standard libraries, IO systems, and hardware access layers to be portable and efficient.
- Creating benchmarks and measurements to quantify C++ feature costs in a particular toolchain.
Who should use this standard
- C++ application developers focused on performance or embedded targets.
- Compiler and library implementers optimizing for time, space, and predictable behavior.
- System architects and firmware engineers needing standardized C/C++ hardware access patterns.
- Performance engineers and QA teams measuring and tuning C++ applications.
Related Standards
- ISO/IEC 14882:2003 - the C++ language standard referenced by this Technical Report.
- WG21 resources (C++ standards committee) for example code and ongoing performance research.
Keywords: ISO/IEC TR 18015, C++ performance, embedded systems, IOStreams, templates, exception handling, ROMability, hardware interface, performance optimization, code size, run-time overhead.