RFR: 8255729: com.sun.tools.javac.processing.JavacFiler.FilerOutputStream is inefficient [v2]

Guoxiong Li github.com+13688759+lgxbslgx at openjdk.java.net
Tue Dec 22 05:40:56 UTC 2020

On Mon, 21 Dec 2020 09:34:59 GMT, Joel Borggrén-Franck <jfranck at openjdk.org> wrote:

>> Guoxiong Li has updated the pull request incrementally with one additional commit since the last revision:
>>   Use Objects::checkFromIndexSize
> I'd like to see some kind of evidence that performance was actually improved. I realise this might be hard to make a good standalone test for, but it should be doable as an experiment observing how many times write(int) is called for a huge file.

I revised the code by using `Objects::checkFromIndexSize`. I don't revise the code in `FilterOutputStream` because it is the content of package `java.base/java.io`. If you thought the `FilterOutputStream::write(byte b[], int off, int len)` is needed to be modified, I will revise it, too.

Thank you for taking the time to review.


PR: https://git.openjdk.java.net/jdk/pull/1854

More information about the compiler-dev mailing list