philadelphia-core: Optimize 'FIXValue#setDigits'
Eliminating a variable further decreases the bytecode size of the
method from 39 bytes to 31 bytes, which is within HotSpot's default
maximum inline size of 35 bytes.
@@ -595,8 +595,8 @@ public class FIXValue {
}
private void setDigits(int value, int offset, int digits) {
- for (int i = offset + digits - 1; i >= offset; i--) {
- bytes[i] = (byte)('0' + value % 10);
+ while (digits-- > 0) {
+ bytes[offset + digits] = (byte)('0' + value % 10);
value /= 10;
}
