Overview
Currently, zeros are run length encoded using the format <length_u8>00. @Vectorized brought up that in situations where zero bytes are non-repeating, it may be more efficient to encode them as <length_u8 - 1>00 to save on non-zero calldata byte costs.
Action item
Profile this optimization to determine whether it saves gas on average. If so, change the encoding scheme to further optimize calldata costs per @Vectorized's suggestion.
Overview
Currently, zeros are run length encoded using the format
<length_u8>00. @Vectorized brought up that in situations where zero bytes are non-repeating, it may be more efficient to encode them as<length_u8 - 1>00to save on non-zero calldata byte costs.Action item
Profile this optimization to determine whether it saves gas on average. If so, change the encoding scheme to further optimize calldata costs per @Vectorized's suggestion.