Posts

Showing posts from March, 2018

SPO 600 Project - Stage 1

For the SPO600 course, I need to complete a project of identifying a CPU-intensive function/method - let's say a checksum or hash algorithm - that is implemented in a language that compiles to machine code (e.g. C, C++, or Assembler) in an open-source project, improving its performance, then get that optimization accepted by the upstream. For more information, click here . Find an open source package For this project, I chose Tengine , a fork of the web server nginx  developed by Taobao . When I'm reading its source code in Github, I noticed that it also uses the MurmurHash , just like nginx. Since MurmurHash itself is a simple hash function, it would be difficult to improve it (I still remembered my professor once said an easy program is the most difficult one to optimize), I decided to accept the challenge, because why not? Benchmark the performance on AArch64 As the function is very simple, testing its performance is much simpler than I imagine: I just extract the

SPO 600 - Lab 5

Image
In Lab 5, I will be looking at Algorithm Selection and how the algorithm affect the system's performance. For more information, click here . I will be doing this lab on Aarch64, and I will compile my programs with -O3 optimization. Original version Right now I will checking if it produces the same result every single time, how long it takes to scaling the sound samples, and how long it takes to run. (Note: to view how long it takes for the system to execute a command, type time before it. For more information, consult the man page of time .) In each run, the program always produces the same result, but the time of scaling the sound samples and the run-time in each run are slightly different. Yes, the difference is so small, but at the end the numbers are still different, right? Version 2 - Lookup table In this version, I will create a lookup table of all possible sample values multiplied by the volume factor. Like the original, in each run, it also always pr