`val.length` caching