Page MenuHomeSolus

clang start up is very slow compared to gcc
Open, NormalPublic

Description

Clang startup is very slow compared to gcc, for example:

perf stat -r 10 clang -v : avg. time 0.012593
perf stat -r 10 gcc -v : avg. time 0.0008023

We should strive to reduce the startup time to improve clang performance, it should make a difference for especially small files e.g. configure/cmake checks. Our clang is already built with PGO, ThinLTO and BOLT'd for performance so this is currently the lowest hanging fruit.

There are two main ways I can think of to reduce the startup time

  • Link clang statically
  • Reduce the number of unnecessary candidate triplets and paths clang looks through during startup.

Option two seems the easier of the two.

Event Timeline

joebonrichie created this task.
joebonrichie moved this task from Backlog to Improvement on the Software board.
joebonrichie updated the task description. (Show Details)