RFR: 8220502: Inefficient pre-sizing of PhiResolverState arrays in c1_LIRGenerator
vladimir.kozlov at oracle.com
Wed Mar 13 18:15:30 UTC 2019
By default GrowableArray allocate 2 elements.
Looking on C1 code I see that it indeed you can benefit to not resizing by default _virtual_operands
and _vreg_table arrays. But _other_operands may need to be resized to actual registers numbers I
think. But it needs to be verified. Also the code is used only for Phi nodes, as I understand, that
is why it may not have big impact regardless resizing.
In general I agree with these changes.
On 3/13/19 4:03 AM, Claes Redestad wrote:
> the PhiResolverState arrays are pre-sized to the maximum possible number
> of nodes that can be put into them, which when instrumenting turns out
> to be quite excessive. By not pre-sizing to the theoretical maximum I
> can measure a substantial improvements in calling methods.
> Webrev: http://cr.openjdk.java.net/~redestad/8220502/open.00/
> Bug: https://bugs.openjdk.java.net/browse/JDK-8220502
> Testing: tier1-3
> On a set of startup and footprint benchmarks, 60% of collected metrics
> show 0.2-2% statistically significant improvements, with no
> regression on any metric.
More information about the hotspot-compiler-dev