On Wed, 20 Jul 2022 11:19:11 GMT, Andrey Turbanov wrote:
>> The comment was about WeekFields.of(), I misplaced the comment.
>>
>> @szegedi All good points about modernizing code...
>> One of the reasons to ask about specific performance data is to validate the
>> general performance impact of u
On Wed, 6 Jul 2022 14:11:39 GMT, Roger Riggs wrote:
>> @RogerRiggs in my view, it's not about performance per se… I'll sometimes
>> help along these kinds of small fix PRs (that are more likely than not
>> driven by IntelliJ code refactoring suggestions) if I think they lead to
>> more idiomat
On Tue, 5 Jul 2022 21:27:16 GMT, Attila Szegedi wrote:
>> Can there be some JMH tests to confirm the performance?
>> The value domain of the keys is pretty limited (7 * 7) max; and I'm not sure
>> that the combination of creating a new record and the hashcode and equals
>> methods would be fast
On Tue, 5 Jul 2022 15:26:06 GMT, Roger Riggs wrote:
>> Well, if you _really_ want to noodle this for performance, you can also
>> store a `this`-bound lambda in a `private final` instance field, so then
>> it's only created once too. I wouldn't put it past `javac` to do this, but
>> I'd have
On Sun, 3 Jul 2022 22:06:58 GMT, Attila Szegedi wrote:
>> src/java.base/share/classes/java/time/format/DateTimeTextProvider.java line
>> 312:
>>
>>> 310: private Object findStore(TemporalField field, Locale locale) {
>>> 311: Entry key = createEntry(field, locale);
>>> 312:
On Tue, 5 Jul 2022 15:26:06 GMT, Roger Riggs wrote:
>> Well, if you _really_ want to noodle this for performance, you can also
>> store a `this`-bound lambda in a `private final` instance field, so then
>> it's only created once too. I wouldn't put it past `javac` to do this, but
>> I'd have
On Sun, 3 Jul 2022 19:47:16 GMT, Attila Szegedi wrote:
>> Andrey Turbanov has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> 8288723: Avoid redundant ConcurrentHashMap.get call in java.time
>> use computeIfAbsent where lambda could be sho
On Sun, 3 Jul 2022 19:44:55 GMT, Attila Szegedi wrote:
>> But it will generate garbage: non-static lambda.
>
> It already generates some garbage as it does string concatenation for the
> key. Here's an idea: declare a record class for the key, `record
> CacheKey(DayOfWeek firstDayOfWeek, int mi
On Sun, 3 Jul 2022 20:42:53 GMT, liach wrote:
>> Andrey Turbanov has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> 8288723: Avoid redundant ConcurrentHashMap.get call in java.time
>> use computeIfAbsent where lambda could be short and st
On Wed, 22 Jun 2022 21:29:50 GMT, Andrey Turbanov wrote:
>> Instead of separate ConcurrentHashMap.get call, we can use result of
>> previous putIfAbsent call.
>
> Andrey Turbanov has updated the pull request incrementally with one
> additional commit since the last revision:
>
> 8288723: Avo
On Tue, 28 Jun 2022 07:27:30 GMT, Andrey Turbanov wrote:
>> src/java.base/share/classes/java/time/temporal/WeekFields.java line 331:
>>
>>> 329: String key = firstDayOfWeek.toString() +
>>> minimalDaysInFirstWeek;
>>> 330: WeekFields rules = CACHE.get(key);
>>> 331: if (
On Wed, 22 Jun 2022 21:29:50 GMT, Andrey Turbanov wrote:
>> Instead of separate ConcurrentHashMap.get call, we can use result of
>> previous putIfAbsent call.
>
> Andrey Turbanov has updated the pull request incrementally with one
> additional commit since the last revision:
>
> 8288723: Avo
On Fri, 24 Jun 2022 07:22:05 GMT, Jaikiran Pai wrote:
>> Andrey Turbanov has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> 8288723: Avoid redundant ConcurrentHashMap.get call in java.time
>> use computeIfAbsent where lambda could be shor
On Wed, 22 Jun 2022 21:29:50 GMT, Andrey Turbanov wrote:
>> Instead of separate ConcurrentHashMap.get call, we can use result of
>> previous putIfAbsent call.
>
> Andrey Turbanov has updated the pull request incrementally with one
> additional commit since the last revision:
>
> 8288723: Avo
> Instead of separate ConcurrentHashMap.get call, we can use result of previous
> putIfAbsent call.
Andrey Turbanov has updated the pull request incrementally with one additional
commit since the last revision:
8288723: Avoid redundant ConcurrentHashMap.get call in java.time
use computeIfAb
15 matches
Mail list logo