College Work / 6.1060

6.1060

6.1060 Software Performance Engineering is a very demanding but very rewarding class that teaches efficient asymptotic and cache-aware algorithms, parallel programming (specifically OpenCilk), bit-level optimizations, and how to use tools like perf and valgrind. It covers both a theoretical understanding of algorithms and performance engineering as well as gives students free reign to try any optimization they can think of on large projects. The majority of class work were large projects such as efficient implementations of image rotation, a memory allocator, an engine for a chess-like game, and 3D rendering and implementation of a physics simulation. A small subset of the optimizations I used in the class are

  • restructuring an algorithm to easily filter out useless work that would be overwritten anyway
  • breaking a triangular iteration space for pairwise data updates into smaller triangles and squares recursively for parallel processing
  • reducing memory allocation by keeping persistent state to cut back on malloc and free calls
  • doing some precomputation on data to provide a fastpath later on
  • packing metadata efficiently where certain bits either hold object data or extra metadata depending on object state
  • using bit hacks for endianness
  • using size based-bins for efficient search

Overall, I would highly recommend. Here’s some youtube videos of the lectures and you can probably find other course materials online as well.