Added a bunch of compare optimization tests.