You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[PPC] Make assembler.cpp compile over 30 times faster
Clang was taking around 30 seconds to compile assembler.cpp on my
machine, with most of its time spent in code generation for the global
initializer for `lookup`.
Changing the map key from `std::string` to `std::string_view` drops
compile time to under a second. This is because the compiler no longer
has to code gen the allocation, initialization, and moves of 2,100
`std::string`s. `std::string_view` is effectively free to initialize in
comparison.
While I was here I made the map `static const`. It's not required for
the build time improvement, but it is more correct and helped me check
that no-one is mutating the map.
0 commit comments