Use COMPARE_TO function generator instaed of manually generating comparison code