Let's see if there is something interesting to do from https://dendibakh.github.io/blog/2019/02/16/Performance-optimization-contest-1
sudo sh -c "echo 0 > /proc/sys/kernel/perf_event_paranoid"
This is what the original is doing:
$> gcc sieve.c -O3 -o sieve
$> time -p ./sieve
Count: 1028
real 4.02
user 4.02
sys 0.00
Assuming Intel SEAPI is build in suggested location (/opt/intel
).
mkdir build
cd build
cmake ..
cd ..
cmake --build build
./build/OptOne
***WARNING*** CPU scaling is enabled, the benchmark real time measurements may be noisy and will incur extra overhead.
They currently recommend the following
sudo cpupower frequency-set --governor performance
./mybench
sudo cpupower frequency-set --governor powersave
Apply this patch to eliminate the benchmark noise when analysing the performance
- With OR and predication:
- With multiplication and predication (first commit I think included there just for completeness):