RFR: 8270836: Foolproof JavadocTester.checkOutput [v2]

Jonathan Gibbons jjg at openjdk.java.net
Fri Jul 16 15:30:55 UTC 2021


On Fri, 16 Jul 2021 14:53:53 GMT, Pavel Rappo <prappo at openjdk.org> wrote:

>> test/langtools/jdk/javadoc/lib/javadoc/tester/JavadocTester.java line 568:
>> 
>>> 566:         }
>>> 567:         return false;
>>> 568:     }
>> 
>> Interesting trade off in performance:
>> * either create sorted array and do `o(N)` scan 
>> * or just do `o(N^2)` scan
>
> For manually enumerated strings the difference between O(N*log(N)) and O(N^2) is all but absent due to a rather small N. That said, if you think that O(N^2) scan would read better, I can use it instead.

I don't have any data to support a strong feeling either way.  It did take a moment to realize what the code was doing.

-------------

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


More information about the javadoc-dev mailing list