RFR: 8224202: Speed up Properties.load
claes.redestad at oracle.com
Thu May 23 15:43:32 UTC 2019
On 2019-05-23 16:42, Roger Riggs wrote:
> Hi Claes,
> Looking good.
> Is there any performance benefit to using ?: instead of if..else at
> Line 509-515 c = (fromStream) ? (char) (byteBuf[off++] & 0xFF) :
> Line 578-581: precedingBackslash = (c == '\\') ? !precedingBackslash :
well, there's possibly a (tiny) benefit: ternary expressions generate
slightly more compact bytecode in some cases; in this case trims away
~40 bytes from LineReader.class. When looking at profiles of how many
get executed there's no real difference though, so it hardly matters.
> Line 600: add 'the" to "characters in +the+ following line"
More information about the core-libs-dev