This lab required us to implement two different methods to do the same process, to allow us to adjust the volume of a sequence of samples. This program would be implemented in C, and use the time.h library through the entire system.
Implementation One –
This implementation uses the time.h library. This implementation does all the calculations and assignments in a for loop which would loop the defined “size” amount of times.
Implementation Two –
The other method we use to do this process does the calculations outside of the for loop (data hosting) to improve the efficiency of the code. This way we reduce the number of multiplication calls. We also removed the implementation which prevented the complied from optimizing the loop & ensured that our second implementation would have better performance overall
Final Thought –
From further investigation, we discovered the AArch64 server was the one which benefited the most from the optimization. We discovered the -O3 GCC argument creates the most optimized executable. However on the X86_64 server default optimization made only minor improvements to the runtime of the program