Re: RFR: 8310241: OffsetDateTime compareTo redundant computation [v2]

2023-06-28 Thread Naoto Sato
On Wed, 28 Jun 2023 17:46:51 GMT, Roger Riggs wrote: >> Remove a redundant comparison in java.time `OffsetDateTime.compareTo()`. >> If the `compareInstant` utility method returns 0 (equal), it compares the >> `LocalDateTime`. >> However, `compareInstant` has already done that comparison; if it

Re: RFR: 8310241: OffsetDateTime compareTo redundant computation [v2]

2023-06-28 Thread Roger Riggs
On Wed, 28 Jun 2023 19:35:27 GMT, Naoto Sato wrote: >> Roger Riggs has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Reopen to work on an improved fix >> Add a test for the specific condition being optimized, the test was >> missing in

Re: RFR: 8310241: OffsetDateTime compareTo redundant computation [v2]

2023-06-28 Thread Naoto Sato
On Wed, 28 Jun 2023 17:46:51 GMT, Roger Riggs wrote: >> Remove a redundant comparison in java.time `OffsetDateTime.compareTo()`. >> If the `compareInstant` utility method returns 0 (equal), it compares the >> `LocalDateTime`. >> However, `compareInstant` has already done that comparison; if it

Re: RFR: 8310241: OffsetDateTime compareTo redundant computation

2023-06-28 Thread Roger Riggs
On Thu, 22 Jun 2023 19:03:03 GMT, Roger Riggs wrote: > Remove a redundant comparison in java.time `OffsetDateTime.compareTo()`. > If the `compareInstant` utility method returns 0 (equal), it compares the > `LocalDateTime`. > However, `compareInstant` has already done that comparison; if it

Re: RFR: 8310241: OffsetDateTime compareTo redundant computation

2023-06-26 Thread Roger Riggs
On Mon, 26 Jun 2023 18:28:47 GMT, Naoto Sato wrote: >> Remove a redundant comparison in java.time `OffsetDateTime.compareTo()`. >> If the `compareInstant` utility method returns 0 (equal), it compares the >> `LocalDateTime`. >> However, `compareInstant` has already done that comparison; if it

Re: RFR: 8310241: OffsetDateTime compareTo redundant computation

2023-06-26 Thread Roger Riggs
On Thu, 22 Jun 2023 19:03:03 GMT, Roger Riggs wrote: > Remove a redundant comparison in java.time `OffsetDateTime.compareTo()`. > If the `compareInstant` utility method returns 0 (equal), it compares the > `LocalDateTime`. > However, `compareInstant` has already done that comparison; if it

Re: RFR: 8310241: OffsetDateTime compareTo redundant computation

2023-06-26 Thread Naoto Sato
On Thu, 22 Jun 2023 19:03:03 GMT, Roger Riggs wrote: > Remove a redundant comparison in java.time `OffsetDateTime.compareTo()`. > If the `compareInstant` utility method returns 0 (equal), it compares the > `LocalDateTime`. > However, `compareInstant` has already done that comparison; if it

RFR: 8310241: OffsetDateTime compareTo redundant computation

2023-06-22 Thread Roger Riggs
Remove a redundant comparison in java.time `OffsetDateTime.compareTo()`. If the `compareInstant` utility method returns 0 (equal), it compares the `LocalDateTime`. However, `compareInstant` has already done that comparison; if it found equal, the `compareTo` method unnecessarily does it again.