optimize compare
optimize compare