On Wed, 13 Sep 2023 21:22:43 GMT, 温绍锦 wrote:
> Based on the use cases cited, if your library needs specific performance
> improvements for specific formats, they should be done in that library.
Not only JSON libraries, toString optimization of Date/Instant/LocalDateTime
and other classes will
On Wed, 13 Sep 2023 14:22:35 GMT, 温绍锦 wrote:
>> improve date toString performance, includes:
>>
>> java.util.Date.toString
>> java.util.Date.toGMTString
>> java.time.Instant.toString
>> java.time.LocalDate.toString
>> java.time.LocalDateTime.toString
>> java.time.LocalTime.toString
>
> 温绍锦 has u
On Wed, 13 Sep 2023 19:21:34 GMT, Roger Riggs wrote:
> Based on the use cases cited, if your library needs specific performance
> improvements for specific formats, they should be done in that library.
I already do this in [fastjson2](https://github.com/alibaba/fastjson2) for now,
but more lib
On Wed, 13 Sep 2023 14:22:35 GMT, 温绍锦 wrote:
>> improve date toString performance, includes:
>>
>> java.util.Date.toString
>> java.util.Date.toGMTString
>> java.time.Instant.toString
>> java.time.LocalDate.toString
>> java.time.LocalDateTime.toString
>> java.time.LocalTime.toString
>
> 温绍锦 has u
On Wed, 13 Sep 2023 14:22:35 GMT, 温绍锦 wrote:
>> improve date toString performance, includes:
>>
>> java.util.Date.toString
>> java.util.Date.toGMTString
>> java.time.Instant.toString
>> java.time.LocalDate.toString
>> java.time.LocalDateTime.toString
>> java.time.LocalTime.toString
>
> 温绍锦 has u
On Tue, 12 Sep 2023 22:53:34 GMT, Claes Redestad wrote:
>> The reason for not using off++ is that it can be executed out of order,
>> which may result in better performance.
>
> I don't think that would outweigh the extra branch and the increased code
> size. I'd opt for simplicity.
I've simpl
> improve date toString performance, includes:
>
> java.util.Date.toString
> java.util.Date.toGMTString
> java.time.Instant.toString
> java.time.LocalDate.toString
> java.time.LocalDateTime.toString
> java.time.LocalTime.toString
温绍锦 has updated the pull request incrementally with one additional
On Tue, 12 Sep 2023 23:10:43 GMT, Claes Redestad wrote:
>>> Have you considered potentially more generalizable optimizations to
>>> `DateTimeFormatter.ISO_INSTANT.format(this)` here?
>>>
>>> Hand-rolling a fixed-length buffer, skipping the `StringBuilder` ..
>>> understandably this can have a
> improve date toString performance, includes:
>
> java.util.Date.toString
> java.util.Date.toGMTString
> java.time.Instant.toString
> java.time.LocalDate.toString
> java.time.LocalDateTime.toString
> java.time.LocalTime.toString
温绍锦 has updated the pull request incrementally with two additional
> improve date toString performance, includes:
>
> java.util.Date.toString
> java.util.Date.toGMTString
> java.time.Instant.toString
> java.time.LocalDate.toString
> java.time.LocalDateTime.toString
> java.time.LocalTime.toString
温绍锦 has updated the pull request incrementally with one additional
On Tue, 12 Sep 2023 17:53:47 GMT, ExE Boss wrote:
>> 温绍锦 has updated the pull request incrementally with one additional commit
>> since the last revision:
>>
>> merge from master
>
> src/java.base/share/classes/java/time/LocalTime.java line 141:
>
>> 139: @Stable
>> 140: static final
On Wed, 13 Sep 2023 01:15:38 GMT, 温绍锦 wrote:
>> improve date toString performance, includes:
>>
>> java.util.Date.toString
>> java.util.Date.toGMTString
>> java.time.Instant.toString
>> java.time.LocalDate.toString
>> java.time.LocalDateTime.toString
>> java.time.LocalTime.toString
>
> 温绍锦 has u
On Tue, 12 Sep 2023 23:08:25 GMT, Claes Redestad wrote:
>> 温绍锦 has updated the pull request incrementally with one additional commit
>> since the last revision:
>>
>> merge from master
>
> src/java.base/share/classes/jdk/internal/util/DecimalDigits.java line 77:
>
>> 75:
>> 76: static {
> improve date toString performance, includes:
>
> java.util.Date.toString
> java.util.Date.toGMTString
> java.time.Instant.toString
> java.time.LocalDate.toString
> java.time.LocalDateTime.toString
> java.time.LocalTime.toString
温绍锦 has updated the pull request incrementally with one additional
On Tue, 12 Sep 2023 17:23:00 GMT, 温绍锦 wrote:
>> improve date toString performance, includes:
>>
>> java.util.Date.toString
>> java.util.Date.toGMTString
>> java.time.Instant.toString
>> java.time.LocalDate.toString
>> java.time.LocalDateTime.toString
>> java.time.LocalTime.toString
>
> 温绍锦 has u
On Tue, 12 Sep 2023 13:10:42 GMT, 温绍锦 wrote:
>> Of course, the optimization of DateTimeFormatter is more general, and we can
>> spend time doing it later. The format of toString is fixed, we can not use
>> DateTimeFormatter.
>
>> Have you considered potentially more generalizable optimizations
On Mon, 11 Sep 2023 16:13:01 GMT, 温绍锦 wrote:
>> It was a suggestion, implicitly paired with removing ` + (year < 0 ? 1 : 0)`
>> from line 2188.
>
> The reason for not using off++ is that it can be executed out of order, which
> may result in better performance.
I don't think that would outweig
On Tue, 12 Sep 2023 17:23:00 GMT, 温绍锦 wrote:
>> improve date toString performance, includes:
>>
>> java.util.Date.toString
>> java.util.Date.toGMTString
>> java.time.Instant.toString
>> java.time.LocalDate.toString
>> java.time.LocalDateTime.toString
>> java.time.LocalTime.toString
>
> 温绍锦 has u
> improve date toString performance, includes:
>
> java.util.Date.toString
> java.util.Date.toGMTString
> java.time.Instant.toString
> java.time.LocalDate.toString
> java.time.LocalDateTime.toString
> java.time.LocalTime.toString
温绍锦 has updated the pull request incrementally with one additional
> improve date toString performance, includes:
>
> java.util.Date.toString
> java.util.Date.toGMTString
> java.time.Instant.toString
> java.time.LocalDate.toString
> java.time.LocalDateTime.toString
> java.time.LocalTime.toString
温绍锦 has updated the pull request with a new target base due to a me
On Tue, 12 Sep 2023 13:54:34 GMT, Roger Riggs wrote:
> You haven't make the case for these changes, please describe the use cases
> when performance is a significant constraint on application performance. The
> changes largely just add more code to maintain without otherwise adding
> sufficien
On Tue, 12 Sep 2023 13:05:19 GMT, 温绍锦 wrote:
>> improve date toString performance, includes:
>>
>> java.util.Date.toString
>> java.util.Date.toGMTString
>> java.time.Instant.toString
>> java.time.LocalDate.toString
>> java.time.LocalDateTime.toString
>> java.time.LocalTime.toString
>
> 温绍锦 has u
On Mon, 11 Sep 2023 14:59:25 GMT, 温绍锦 wrote:
>> The performance of optimizing DateTimeFormatter cannot be as fast as using
>> ixed-length buffer directly.
>
> Of course, the optimization of DateTimeFormatter is more general, and we can
> spend time doing it later. The format of toString is fixe
> improve date toString performance, includes:
>
> java.util.Date.toString
> java.util.Date.toGMTString
> java.time.Instant.toString
> java.time.LocalDate.toString
> java.time.LocalDateTime.toString
> java.time.LocalTime.toString
温绍锦 has updated the pull request incrementally with two additional
> improve date toString performance, includes:
>
> java.util.Date.toString
> java.util.Date.toGMTString
> java.time.Instant.toString
> java.time.LocalDate.toString
> java.time.LocalDateTime.toString
> java.time.LocalTime.toString
温绍锦 has updated the pull request incrementally with two additional
> improve date toString performance, includes:
>
> java.util.Date.toString
> java.util.Date.toGMTString
> java.time.Instant.toString
> java.time.LocalDate.toString
> java.time.LocalDateTime.toString
> java.time.LocalTime.toString
温绍锦 has updated the pull request incrementally with one additional
> improve date toString performance, includes:
>
> java.util.Date.toString
> java.util.Date.toGMTString
> java.time.Instant.toString
> java.time.LocalDate.toString
> java.time.LocalDateTime.toString
> java.time.LocalTime.toString
温绍锦 has updated the pull request with a new target base due to a me
> improve date toString performance, includes:
>
> java.util.Date.toString
> java.util.Date.toGMTString
> java.time.Instant.toString
> java.time.LocalDate.toString
> java.time.LocalDateTime.toString
> java.time.LocalTime.toString
温绍锦 has updated the pull request with a new target base due to a me
On Mon, 11 Sep 2023 14:42:33 GMT, Claes Redestad wrote:
>> this place doesn't need off++
>
> It was a suggestion, implicitly paired with removing ` + (year < 0 ? 1 : 0)`
> from line 2188.
The reason for not using off++ is that it can be executed out of order, which
may result in better perform
On Mon, 11 Sep 2023 14:44:24 GMT, 温绍锦 wrote:
>> improve date toString performance, includes:
>>
>> java.util.Date.toString
>> java.util.Date.toGMTString
>> java.time.Instant.toString
>> java.time.LocalDate.toString
>> java.time.LocalDateTime.toString
>> java.time.LocalTime.toString
>
> 温绍锦 has u
On Mon, 11 Sep 2023 14:54:57 GMT, 温绍锦 wrote:
>> src/java.base/share/classes/java/time/Instant.java line 1355:
>>
>>> 1353: @Override
>>> 1354: public String toString() {
>>> 1355: return DateTimeFormatter.ISO_INSTANT.format(this);
>>
>> Have you considered potentially more gener
On Mon, 11 Sep 2023 13:29:14 GMT, Claes Redestad wrote:
>> 温绍锦 has updated the pull request incrementally with one additional commit
>> since the last revision:
>>
>> fix LocalDate.getChars offset
>
> src/java.base/share/classes/java/time/Instant.java line 1355:
>
>> 1353: @Override
>> 1
On Mon, 11 Sep 2023 14:38:28 GMT, 温绍锦 wrote:
>> src/java.base/share/classes/java/time/LocalDate.java line 2181:
>>
>>> 2179: if (yearAbs < 1000) {
>>> 2180: if (year < 0) {
>>> 2181: buf[off] = '-';
>>
>> `buf[off++] = '-';`
>
> this place doesn't need off++
On Mon, 11 Sep 2023 13:50:30 GMT, Claes Redestad wrote:
>> 温绍锦 has updated the pull request incrementally with one additional commit
>> since the last revision:
>>
>> fix LocalDate.getChars offset
>
> src/java.base/share/classes/java/time/LocalDate.java line 2181:
>
>> 2179: if (year
> improve date toString performance, includes:
>
> java.util.Date.toString
> java.util.Date.toGMTString
> java.time.Instant.toString
> java.time.LocalDate.toString
> java.time.LocalDateTime.toString
> java.time.LocalTime.toString
温绍锦 has updated the pull request incrementally with one additional
On Mon, 11 Sep 2023 13:45:43 GMT, 温绍锦 wrote:
> After PR #15651 is merged, changes will be made based on the new API. Until
> then, you can help review other changes.
I mean, OpenJDK's GitHub bots has a special handling system that allows you to
include code from #15651 in this PR:
1. Merge yo
On Mon, 11 Sep 2023 12:12:17 GMT, 温绍锦 wrote:
> improve date toString performance, includes:
>
> java.util.Date.toString
> java.util.Date.toGMTString
> java.time.Instant.toString
> java.time.LocalDate.toString
> java.time.LocalDateTime.toString
> java.time.LocalTime.toString
As @liach says this
On Mon, 11 Sep 2023 13:42:30 GMT, Chen Liang wrote:
> I think you should make this a dependent of #15651, so you can change the
> base branch of pr to `openjdk:pr/15651` and you can base your work off that
> pull request too.
After PR #15651 is merged, changes will be made based on the new API
On Mon, 11 Sep 2023 12:12:17 GMT, 温绍锦 wrote:
> improve date toString performance, includes:
>
> java.util.Date.toString
> java.util.Date.toGMTString
> java.time.Instant.toString
> java.time.LocalDate.toString
> java.time.LocalDateTime.toString
> java.time.LocalTime.toString
I think you should m
On Mon, 11 Sep 2023 12:12:17 GMT, 温绍锦 wrote:
> improve date toString performance, includes:
>
> java.util.Date.toString
> java.util.Date.toGMTString
> java.time.Instant.toString
> java.time.LocalDate.toString
> java.time.LocalDateTime.toString
> java.time.LocalTime.toString
@cl4es can you help
On Mon, 11 Sep 2023 12:12:17 GMT, 温绍锦 wrote:
> improve date toString performance, includes:
>
> java.util.Date.toString
> java.util.Date.toGMTString
> java.time.Instant.toString
> java.time.LocalDate.toString
> java.time.LocalDateTime.toString
> java.time.LocalTime.toString
@liach can you help
improve date toString performance, includes:
java.util.Date.toString
java.util.Date.toGMTString
java.time.Instant.toString
java.time.LocalDate.toString
java.time.LocalDateTime.toString
java.time.LocalTime.toString
-
Commit messages:
- improve date toString performance, includes:
Ch
42 matches
Mail list logo