Perflint: A Context
Sensitive Performance Advisor for C++ Programs
Abstract: We present perflint, a new industrial strength open source
analysis tool that identifies suboptimal use patterns of the C++ standard library.
Simply by recompiling and running on a representative input set, programmers receive
context sensitive performance advice on their use of standard library data structures
and algorithms. Our solution consists of collecting traces of relevant library
operations and state during program execution, and then recognizing patterns for which
there is a faster alternative, based on a model made of performance guarantees in the
C++ language standard and machine knowledge. perflint has already found hundreds of
suboptimal patterns in a set of large C++ benchmarks. In one case, following the advice
and changing one line of code resulted in 17% program run time reduction.