Net 8 Activity

The cs61-lectures/net8 directory contains a program called matrixmultiply (source in 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 into other filenames; for instance, given a file like, 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.