1. 10
  1.  

  2. 2

    This is very useful also to Rust programmers, where similar issues exist.

    BTW, there’s a tool that tries to assess how much cost compilation of generic constructs introduces by counting the number of (unoptimised) llvm IR lines are emitted. https://github.com/dtolnay/cargo-llvm-lines

    A similar approach might be useful when trying to fine optimisation targets for compile times of C++ code.