comparison optimization