Project Part 3
Alright, let's start off with the most relevant function: mainSimpleSort (50%, 28%) Right off the bat, there's a tiny bit of hoisting that was half-done but seems to have been forgotten. As you can see, lo + h - 1 is loop invariant. lo + h is actually calculated outside the loop at the very beginning of the function, but it is used as a counter. I will create a separate variable called loHi_1 and hoist this calculation. This hoist can be repeated three times, since there are three separate instances of this condition in three separate loops. Another hoist we can do is move the v+d calculation outside the loop. I've repeated the same procedure, storing this result into a variable called v_d . At this point in my blog post, I would like to thank the person who created the bZip2 makefile. At the end of the makefile, there are six small sample files that are run through the bZip2 function suite (decompress, compress, recompress) and their results are automatically