On Tue, 10 Mar 2026 16:47:13 GMT, Paul Hübner <[email protected]> wrote:

>> Frederic Parain has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Fix generation of short values
>
> test/hotspot/jtreg/runtime/valhalla/inlinetypes/field_layout/ValueClassGenerator.java
>  line 341:
> 
>> 339: 
>> 340:         String generateSource() {
>> 341:             String src = 
>> abstractValueClassTemplate.replaceAll("<class_modifiers>", "public abstract 
>> value class");
> 
> FYI: `String#replaceAll` takes a regex as a string argument. A normal 
> `String#replace` will already replace all occurrences. This doesn't really 
> matter since our search string does not contain meta characters, but given 
> that we call `generateSource` quite a few times it might eat CPU cycles 
> compiling the regex for every replacement.

Fixed

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

PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2202#discussion_r2918243782

Reply via email to