Other |
---|
tbdUnresolved |
Relates :
|
This gets redundant allocations eliminated fine: @Benchmark public Object arr_const_2() { Object o; o = new int[10]; o = new int[10]; return o; } ...and here they are not: @Benchmark public Object arr_var_2() { Object o; o = new int[size]; o = new int[size]; return o; } This seems to affect e.g. JavaGrande. Benchmarks: http://cr.openjdk.java.net/~shade/8180290/MultiAlloc.java http://cr.openjdk.java.net/~shade/8180290/benchmarks.jar Perf data: http://cr.openjdk.java.net/~shade/8180290/perf.txt
|