RFR: 8261483: jdk/dynalink/TypeConverterFactoryMemoryLeakTest.java failed with "AssertionError: Should have GCd a method handle by now" [v2]

Aleksey Shipilev shade at openjdk.java.net
Sun Feb 28 07:23:45 UTC 2021


On Sat, 27 Feb 2021 20:10:15 GMT, Attila Szegedi <attila at openjdk.org> wrote:

>> test/jdk/jdk/dynalink/TypeConverterFactoryMemoryLeakTest.java line 79:
>> 
>>> 77: 
>>> 78:     public static void main(String[] args) {
>>> 79:         for (int count = 0; count < MAX_ITERATIONS; ++count) {
>> 
>> Here and later: use postfix `count++`, regular style?
>
> Old habits die hard; I think I started doing this about 30 years ago when writing C code against a compiler on Atari ST that emitted more efficient MC68000 code for `++i` than for `i++`. I guess it's time to unlearn this :-) Of course, if you wanted to get the fastest code, you would've counted _decrementing to zero_ to let the compiler use the DBRA (decrement and branch) instruction.
> 
> It's funny how I _don't_ miss those days.

Good!

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

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


More information about the core-libs-dev mailing list