Skip to content

Instantly share code, notes, and snippets.

@Benitoite
Last active August 28, 2024 05:10
Show Gist options
  • Save Benitoite/9982cd08a997f79d89c27b0c05ce2f83 to your computer and use it in GitHub Desktop.
Save Benitoite/9982cd08a997f79d89c27b0c05ce2f83 to your computer and use it in GitHub Desktop.
wintimer
git clone https://github.com/Benitoite/raw-test .\raw-test; $processor = Get-ComputerInfo -Property CsProcessors; $sockets = (Get-CimInstance Win32_Processor).SocketDesignation.Count ; $num = ($processor.CsProcessors | findstr NumberOfLogicalProcessors).Split(' ')[2]; $num *= $sockets ; $name = ($processor.CsProcessors | findstr Name).Split(':')[-1]; $mhz = ($processor.CsProcessors | findstr Max).Split(':')[-1]; $proc = (cat .\AboutThisBuild.txt | findstr Processor); echo "``````" "================================"; echo "Available threads = $num / CPU =$name / $mhz MHz / Target = $proc"; for ($threads = 2; $threads -le $num; $threads *= 2) { $env:OMP_NUM_THREADS=$threads; $t = 0; $n = 5; $x = 0; for ($i = 0; $i -lt $n; $i++) { $x+=(Measure-Command { .\rawtherapee-cli.exe -j -s -Y -c .\raw-test\typewriter.CR2 } | findstr Ticks).Split(': ')[-1] }; $t+=($x/$n); $x = 0; for ($i = 0; $i -lt $n; $i++) { $x+=(Measure-Command { .\rawtherapee-cli.exe -j -s -Y -c .\raw-test\naturalbridges.CR2 } | findstr Ticks).Split(': ')[-1] }; $t+=($x/$n); $x = 0; for ($i = 0; $i -lt $n; $i++) { $x+=(Measure-Command { .\rawtherapee-cli.exe -j -s -Y -c .\raw-test\beachcabin.ARW } | findstr Ticks).Split(': ')[-1] }; $t+=($x/$n); echo "$([math]::round([decimal]($t/10000),0)) total milliseconds elapsed (average of $n runs) using OMP_NUM_THREADS = $threads" }; echo "================================" "``````"
@Benitoite
Copy link
Author

Benitoite commented Aug 24, 2024

================================
Available threads = 28 / CPU = Intel(R) Xeon(R) CPU E5-2697 v3 @ 2.60GHz / 2601 MHz / Target = Processor: generic x86
58966 total milliseconds elapsed (average of 5 runs) using OMP_NUM_THREADS = 2
35114 total milliseconds elapsed (average of 5 runs) using OMP_NUM_THREADS = 4
23898 total milliseconds elapsed (average of 5 runs) using OMP_NUM_THREADS = 8
21951 total milliseconds elapsed (average of 5 runs) using OMP_NUM_THREADS = 16
================================
================================
Available threads = 28 / CPU = Intel (R) Xeon(R) CPU E5-2697 v3 @ 2.60GHz / 2601 MHz / Target = Processor: sandybridge-ivybridge
57590 total milliseconds elapsed (average of 5 runs) using OMP_NUM_THREADS = 2
34143 total milliseconds elapsed (average of 5 runs) using OMP_NUM_THREADS = 4
22609 total milliseconds elapsed (average of 5 runs) using OMP_NUM_THREADS = 8
21031 total milliseconds elapsed (average of 5 runs) using OMP_NUM_THREADS = 16
================================
================================
Available threads = 28 / CPU = Intel(R) Xeon(R) CPU E5-2697 V3 @ 2.60GHz / 2601 MHz / Target = Processor: skylake-raptorlake
59062 total milliseconds elapsed (average of 5 runs) using OMP_NUM_THREADS = 2
36041 total milliseconds elapsed (average of 5 runs) using OMP_NUM_THREADS = 4
25024 total milliseconds elapsed (average of 5 runs) using OMP_NUM_THREADS = 8
23098 total milliseconds elapsed (average of 5 runs) using OMP_NUM_THREADS = 16
================================

@Benitoite
Copy link
Author

================================
Available threads = 8 / CPU = Intel(R) Xeon(R) CPU E3-1275 V2 @ 3.50GHz /  3501 MHz / Target = Processor: generic x86
56608 total milliseconds elapsed (average of 5 runs) using OMP_NUM_THREADS = 2
40286 total milliseconds elapsed (average of 5 runs) using OMP_NUM_THREADS = 4
33342 total milliseconds elapsed (average of 5 runs) using OMP_NUM_THREADS = 8
================================
================================
Available threads = 8 / CPU = Intel(R) Xeon(R) CPU E3-1275 V2 @ 3.50GHz /  3501 MHz / Target = Processor: sandybridge-ivybridge
55199 total milliseconds elapsed (average of 5 runs) using OMP_NUM_THREADS = 2
36673 total milliseconds elapsed (average of 5 runs) using OMP_NUM_THREADS = 4
33284 total milliseconds elapsed (average of 5 runs) using OMP_NUM_THREADS = 8
================================

@Benitoite
Copy link
Author

================================
Available threads = 4 / CPU = Intel(R) Core(TM) i5-6260U CPU @ 1.80GHz /  1800 MHz / Target = Processor: generic x86
66715 total milliseconds elapsed (average of 5 runs) using OMP_NUM_THREADS = 2
53584 total milliseconds elapsed (average of 5 runs) using OMP_NUM_THREADS = 4
================================
================================
Available threads = 4 / CPU = Intel(R) Core(TM) i5-6260U CPU @ 1.80GHz /  1800 MHz / Target = Processor: sandybridge-ivybridge
65804 total milliseconds elapsed (average of 5 runs) using OMP_NUM_THREADS = 2
52279 total milliseconds elapsed (average of 5 runs) using OMP_NUM_THREADS = 4
================================
================================
Available threads = 4 / CPU = Intel(R) Core(TM) i5-6260U CPU @ 1.80GHz /  1800 MHz / Target = Processor: skylake-raptorlake
64647 total milliseconds elapsed (average of 5 runs) using OMP_NUM_THREADS = 2
52658 total milliseconds elapsed (average of 5 runs) using OMP_NUM_THREADS = 4
================================

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment