Workshop: C++ Performance and Optimisation

-

Day 1 – morning

  • Measurement and big-O notation
  • Factors that drive performance in modern machines
  • Memory hierarchy and caching
  • Function inlining and virtuals
  • Branch prediction
  • Data layout
  • Vectorisation
  • Compiler optimisations

Day 1 – afternoon

  • Value and move semantics, Rule of 3/5/zero
  • RVO, lifetime management, RAII, wrappers
  • Unique and shared pointers
  • Emplacement semantics

Day 2 – morning

  • STL containers and other containers (flat sets/maps)
  • Performance, memory, insertion and search
  • Dense linear access
  • Read and write amplification
  • Six questions about data
  • Operational profile
  • Performance tradeoffs

Day 2 - afternoon

  • Alternative approaches to string handling
  • Dos and don’ts of multithreaded programming
  • Key takeaway points