o
odinpkg.dev
packages / library / performance_aware

performance_aware

initial_haversinelibrary

For Computer Enhance's Performance Aware Course

BSD-2-Clause · updated 2 years ago

Performance Aware Programs

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

  1. gen_haversines - generates test code
  2. compute_haversines - the main code for pt3 that we are profiling and trying to improve
  3. sim8086 - binary decoding of 8086 machine code
  4. verify_binary - small program to verify that a particular binary is identical to another one
  5. query_perf_counters - literally just calls windows.QueryPerformanceCounter and windows.QueryPerformanceFrequency for the purposes of stepping through the asm with a debugger
  6. repetition_testing/* - different repetition tests all using the same harness
  7. abi_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