optimize longerThan()/shorterThan() on subtypes