Compiler Support for Compiler Support for Profiling Profiling C++ C++ Template Template Metaprograms Metaprograms József Mihalicza, Norbert Pataki, Zoltán Porkoláb Eötvös Loránd University Faculty of Informatics Dept. Of Programming Languages and Compilers
17
Embed
Compiler Support for Profiling C++ Template Metaprograms
Compiler Support for Profiling C++ Template Metaprograms. József Mihalicza , Norbert Pataki , Zoltán Porkoláb Eötvös Loránd University Faculty of Informatics Dept. Of Programming Languages and Compilers. Outline. Templates in C++ Template metaprograms - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Compiler Support for Compiler Support for
Profiling Profiling
C++ C++ Template Template
MetaprogramsMetaprogramsJózsef Mihalicza, Norbert Pataki, Zoltán Porkoláb
Eötvös Loránd University
Faculty of Informatics
Dept. Of Programming Languages and Compilers
SPLST’11
OutlineOutline
Templates in C++Templates in C++
Template metaprogramsTemplate metaprograms
EfficiencEfficiencyy problems with C++ problems with C++
templates templates
Earlier efforts / Related worksEarlier efforts / Related works
Our solutionOur solution
ExamplesExamples
SPLST’11
C++ templatesC++ templates
Parametric polymorphismParametric polymorphism
Fundamental tools for generic Fundamental tools for generic
programmingprogramming
UnconstrainedUnconstrained
Implemented by instantiationImplemented by instantiation
We have to measure template metaprogramsWe have to measure template metaprograms(and perhaps all large projects with many (and perhaps all large projects with many templates)templates)
Measuring compilation units are not feasible in Measuring compilation units are not feasible in real-world industrial projectsreal-world industrial projects
Preprocessing step has a significant overheadPreprocessing step has a significant overhead Instrumentation has a linear distortionInstrumentation has a linear distortion Modification of compiler can eliminate warning Modification of compiler can eliminate warning
overheadoverhead Template metaprogram profiling is still learnedTemplate metaprogram profiling is still learned