Implementations of the homework for the various parts of the performance aware course
Reference impls / homeworks are in the Computer Enhance Github
Written in Odin
Each application can be built using odin build <dir> e.g. odin build ./gen_haversines
These should all work on any OS other than query_perf_counters which specifically uses the windows intrinsics for the purposes of stepping through asm in a debugger (one of the homeworks). But note since the course uses RDTSC I do so here
Each repetition testing binary can be built in a similar way with e.g. odin build repetition_testing/read_ports
gen_haversines- generates test codecompute_haversines- the main code for pt3 that we are profiling and trying to improvesim8086- binary decoding of 8086 machine codeverify_binary- small program to verify that a particular binary is identical to another onequery_perf_counters- literally just callswindows.QueryPerformanceCounterandwindows.QueryPerformanceFrequencyfor the purposes of stepping through the asm with a debuggerrepetition_testing/*- different repetition tests all using the same harnessabi_tester- just does a couple C function calls to verify the ABI / debugging purposes
Since I was starting later and the ASM course was done already, I only went up to decoding Add/Sub, etc. I feel comfortable enough with asm that I'll come back to it later if I feel like it