On Thu, 3 Sep 2026 10:04:07 GMT, Ajit Ghaisas <[email protected]> wrote:

>> Jayathirth D V has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Initialize index variable
>
> src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLTextRenderer.m 
> line 187:
> 
>> 185: 
>> 186:         for (int col = 0; col < ginfo->width; col++) {
>> 187:             dst[col * 4] = src[col * 3];
> 
> `col * 4` and `col * 3` can be stored in a variable and reused instead of 
> repeating the same multiplications.

I think compiler optimizes these things.
But in some case if it doesn't, i have removed the repeated calculations.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/32651#discussion_r3931381676

Reply via email to