feat: add timing across 10 runs.

This commit is contained in:
NunoSempere 2023-06-02 13:56:50 -06:00
parent 331c7566f0
commit e1b180bd5b
2 changed files with 6 additions and 0 deletions

View File

@ -25,6 +25,7 @@ In Nuño's machine, multithreading actually introduces a noticeable slowdown fac
## To do ## To do
- [ ] Use proper profiling tool to capture timing with 1M samples.
- [ ] Update above with correct timing - [ ] Update above with correct timing
- [ ] Add Windows/Powershell time-measuring commands - [ ] Add Windows/Powershell time-measuring commands
- [ ] Add CUDA? - [ ] Add CUDA?

View File

@ -59,5 +59,10 @@ time-linux:
OMP_NUM_THREADS=16 /bin/time -f "Time: %es" ./$(OUTPUT) && echo OMP_NUM_THREADS=16 /bin/time -f "Time: %es" ./$(OUTPUT) && echo
/bin/time -f "Time: %es" ./$(OUTPUT_ONE_THREAD) && echo /bin/time -f "Time: %es" ./$(OUTPUT_ONE_THREAD) && echo
time-linux-2:
echo "Requires /bin/time, found on GNU/Linux systems" && echo
@t=$$(/usr/bin/time -f "%e" -p bash -c 'for i in {1..10}; do OMP_NUM_THREADS=2 $(OUTPUT); done' 2>&1 >/dev/null | grep real | awk '{print $$2}' ); echo "scale=4; $$t / 10" | bc | sed "s|^|Time for 2 threads: |" | sed 's|$$|s|'
debian-install-dependencies: debian-install-dependencies:
sudo apt-get install libomp-dev sudo apt-get install libomp-dev