avoiding some unecessary int encodings when we are just handling lengths