# Benchmarking Results

In this post, we will be recording the results of our sample scaling using the 3 approaches, Naive Algorithm, Lookup-based Algorithm, and Fixed-point Algorithm. We will also analyze the results on which algorithm had the best performance using CPU time as the measurement.

#### Analysis – Lookup-based Algorithm

Based on the results of the tests ran, Lookup-based Algorithm had the slowest average run time at 22193.25 seconds. It was 81.48% slower then the Naive Algorithm ((lookupAverage-naiveAverage)/lookupAverage). Also, it was slower then the Fixed-point Algorithm by 88.84% ((lookupAverage-fixedpointAverage)/lookupAverage). This algorithm was the slowest out of the three discussed above.

#### Analysis – Fixed-point Algorithm

In the results gathered, Fixed-point Algorithm had the fastest average run time at 2475.704 seconds. We already know that Fixed-point Algorithm was faster then Lookup-based Algorithm by 88.84%, but it was also faster then the Naive Algorithm. The difference in run time was 39.76%. Fixed-point Algorithm was the fastest run time out of the three.

#### Analysis – Naive Algorithm

The Naive Algorithm was not the best, nor was it the worst. It may have not been as fast as Fixed-point Algorithm in terms of Average time to complete the task, but it did relatively good. Naive and Fixed-point had an Average run time of 4.109816 seconds and 2.475704 seconds, respectively. This is only a 1.634112 seconds difference between the two algorithms. Naive Algorithm had a decent run time when compared to the other three algorithms discussed.

#### Conclusion

In conclusion, Fixed-point Algorithm had the fastest run time, due to its avoidance of converting an int to a double, multiplying the two doubles together, then converting it back to an int. This saves the time by not using the decimal mode embedded in the Aarch64. Naive Algorithm had a decent run time with it almost similar to fixed-point, but it converted the values from int to double then back to int. Both algorithms had to do an multiplying operation for each sample. The Lookup-based Algorithm surprised me the most. Maybe it could be the fact that it had to switch to decimal mode with each operation, but it had the slowest run time. Possibly, if we removed the switching to decimal mode, then creating a table, Lookup-based Algorithm may be faster then the other 2 algorithms.