First draft at codespeedization of test/perf

To use, run `make codespeed` in `test/perf`