Stage 3 - Optimization - Compiler Options - xerxes

In this post I'll be testing the performance of building bzip2 with -O3 and other additional options to see how much of difference it makes in performance.

Again, the files and the testing methods are same as on aarch64.


== -O3 ==

sample.txt

largeImage.jpg

Difference


With -O3 option it was 0.08% worse to compress random text file on x86_64 machine, and 1.01% better to compress large image file.
This is weird, it actually got worse to compress text file.
But how does it compare to aarch64?
Compared to same test version (-O3) on aarch64, on x86_64 it was 44.97sec faster to compress random text file, and 1.79secs faster to compress large image file.

== Additional Options ==
**The list of additional options can be found on previous post. Click here**

sample.txt

largeImage.jpg

Difference

So, in this test with additional optimization options the compression of random text file is 0.13% better than out of box, and 0.68% better on large image file.
There was some gain in compressing text file, but some loss on compressing image file.

On both aarch64 and x86_64 machines -O3 alone gives better result with large image file, but -O3 with additional options give better result with text file.

To my best of abilities, this is as much I can do to optimize the program with just using compiler options. I'll be looking at the codes around the hot spots to see if anything can be done on code level.

Comments