Contributor
Ken Matsui

C++: Implement compiler built-ins for the standard library traits


Mentors
ppalka
Organization
GNU Compiler Collection (GCC)
Technologies
c++
Topics
compilers, performance, optimization, libstdc++
Many C++ standard library traits are often implemented using template metaprogramming, which can result in worse compilation performance due to expensive instantiations of multiple class templates. The most likely way to address the costly instantiations is to define compiler built-in traits and get library traits to dispatch to these built-ins. It is also essential to conduct thorough benchmarking and compare the existing implementations with built-in traits, as there may be some library traits that are already optimal or non-built-in approaches that outperform built-ins. Thus, the main goal of this project is to optimize the standard library traits by incorporating built-ins and investigating alternative approaches, with the aim of enhancing the compilation performance.