RFR: 8372444: Genshen: Optimize evacuation function
William Kemper
wkemper at openjdk.org
Mon Dec 1 15:40:32 UTC 2025
On Wed, 26 Nov 2025 02:13:39 GMT, Y. Srinivas Ramakrishna <ysr at openjdk.org> wrote:
>> This is a hot code path. Many of the branches can be eliminated at compile time by introducing template parameters. This change shows a 5% reduction in concurrent evacuation times at the trimmed-10 average on the extremem benchmark:
>>
>>
>> gen/control/extremem
>> Category | Count | Total | GeoMean | Average | Trim 0.1 | StdDev | Minimum | Maximum
>> concurrent_evacuation_young_data | 65 | 9625198.000 | 118747.249 | 148079.969 | 145182.189 | 76534.845 | 7216.000 | 317261.000
>>
>> gen/template/extremem
>> Category | Count | Total | GeoMean | Average | Trim 0.1 | StdDev | Minimum | Maximum
>> concurrent_evacuation_young_data | 65 | 9095084.000 | 113036.539 | 139924.369 | 137661.226 | 71091.273 | 7523.000 | 294442.000
>
> LGTM. Impressed that templatization led to such a substantial improvement.
> Should the 2-case switch in `ShenandoahGenerationalHeap::evacuate_object()` be converted to an `if-else` ?
@ysramakrishna , we have had reviewers in the past ask us to use a switch with this enumeration. I agree an `if/else` would be more compact here, but it would probably belong on a different pull request. Thanks for the review.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28496#issuecomment-3597245231
More information about the shenandoah-dev
mailing list