RFR: 7944: Reduce allocations of Double during chunk loading [v2]
Richard Startin
duke at openjdk.org
Tue Nov 1 13:08:47 UTC 2022
On Thu, 27 Oct 2022 13:58:11 GMT, Richard Startin <duke at openjdk.org> wrote:
>> Using jmc-common as a library in a backend process we see high allocation rates of `Double` and have observed moderate performance improvements from this simple refactoring:
>> * Use primitive `double` in `ImpreciseScaleFactor`
>> * Use primitive `double` in `IScalarAffineTransformation.getOffset`
>> * Push multiplication of a scale factor down to a new method `ScaleFactor.scale(long multiplier)`
>> * Push `ScalarQuantity.in` down to `LongStored`/`DoubleStored` to avoid generalising over primitive types, when the `IQuantity` type can be varied instead.
>> ---------
>> ### Progress
>> - [ ] Commit message must refer to an issue
>> - [ ] Change must be properly reviewed (1 review required, with at least 1 [Committer](https://openjdk.org/bylaws#committer))
>>
>> ### Reviewing
>> <details><summary>Using <code>git</code></summary>
>>
>> Checkout this PR locally: \
>> `$ git fetch https://git.openjdk.org/jmc pull/436/head:pull/436` \
>> `$ git checkout pull/436`
>>
>> Update a local copy of the PR: \
>> `$ git checkout pull/436` \
>> `$ git pull https://git.openjdk.org/jmc pull/436/head`
>>
>> </details>
>> <details><summary>Using Skara CLI tools</summary>
>>
>> Checkout this PR locally: \
>> `$ git pr checkout 436`
>>
>> View PR using the GUI difftool: \
>> `$ git pr show -t 436`
>>
>> </details>
>> <details><summary>Using diff file</summary>
>>
>> Download this PR as a diff file: \
>> <a href="https://git.openjdk.org/jmc/pull/436.diff">https://git.openjdk.org/jmc/pull/436.diff</a>
>>
>> </details>
>
> Richard Startin has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains one commit:
>
> JMC-7944: Reduce allocations of Double during chunk loading
Does this need more testing? The patch doesn't break compilation of any existing unit tests, can we be confident that higher level tests exercise and assert conditions which affected by this change?
-------------
PR: https://git.openjdk.org/jmc/pull/436
More information about the jmc-dev
mailing list