the next piece, an optimizer rearranges the tree structure so the target language is optimized. 'optimized' includes using fewer instructions to perform the same work. this could be important if the final program needs to check a lot of data. (like seeing how many people, in the whole country, are fifty years old "and" buy medicine.) an 'optimized' result might also mean breaking long instructions into smaller ones. unused and unaccessible code will be removed at this step.