CppCon Day 5

Notes for the last day!

JIT Compilation in C++

  • Halide, ArrayFire, PCRE, ClamAV, OpenCL, Blend2D, TensorFlow
  • Templates force specialization, can’t have “fast first tier”
  • They somehow figured out template execution at runtime
    • Compile with clang -fjit
    • Compile non-JIT code as usual, convert references to function templates to clang-JIT references
  • Binary compilation
  • Compilation time speed up by 7x if ignoring library header compilation time
  • Runtime very slightly reduced in small matrix cases for CPU, runtime vastly increased for GPU code
  • Compile-time of Regex vastly increased, but runtime vastly reduced
  • Interesting interaction between reflection & JIT:
    • You really want to limit object size
    • Reflection increases amount of stuff that you can read in templates

Questions I had

  • How does the dense hashmap deal with multithreaded applications (Mutex)
  • What is the baseline for Eigen header compilation? (1-2 seconds)
  • What’s the compile time of the CTRE library without JIT? (???)
  • Is there an option to JIT by default in Clang? (No)
  • Do you think serialization would improve with metaclass support? (Unknown, haven’t tried it)
  • Did benchmarks of other regular expressions demonstrate same behavior that you show here? (Unknown)

Deprecating Volatile

  • Plenty of weird examples with volatile
  • Mostly about the ambiguity of volatile

Inclusivity Panel

  • What would be really helpful is having a plenary session about inclusivity
  • “Virtue signalling”

Talking to Engineers

  • All engineers have imposter syndrome