Net 8 Activity

The cs61-lectures/net8 directory contains a program called matrixmultiply (source in matrixmultiply.cc). This program creates two random square matrices, multiplies them together, prints some information about their product, then exits.

Can you use the knowledge you’ve gained in the class to radically speed up matrixmultiply, while producing (almost) exactly the same results as the original for all arguments?

Note 1: You can copy matrixmultiply.cc into other filenames; for instance, given a file like matrixmultiply-magic.cc, the makefile will generate binaries like matrixmultiply-magic.

Note 2: Docker overheads can overwhelm some performance improvements for this exercise. Try running outside Docker if you can.