Re: RFR: 8368172: Make java.time.format.DateTimePrintContext immutable

2025-09-20 Thread Shaojin Wen
On Sat, 20 Sep 2025 14:04:30 GMT, Roger Riggs wrote: > What is the performance data that makes justifies this change? Its not enough > to just want to make things constant. The current branch is just a refactoring; there's no performance improvement on MacBook M1 Pro. Further changes are need

Re: RFR: 8368172: Make java.time.format.DateTimePrintContext immutable [v3]

2025-09-20 Thread Shaojin Wen
> I propose to make j.t.f.DateTimePrintContext immutable. > > Currently, DateTimePrintContext has only one mutable field, optional. This > can be replaced by adding an optional parameter to the > DateTimeFormatter.formatTo method. > > Immutable DateTimePrintContext can be optimized by escape an

Re: RFR: 8368172: Make java.time.format.DateTimePrintContext immutable [v2]

2025-09-20 Thread Shaojin Wen
> I propose to make j.t.f.DateTimePrintContext immutable. > > Currently, DateTimePrintContext has only one mutable field, optional. This > can be replaced by adding an optional parameter to the > DateTimeFormatter.formatTo method. > > Immutable DateTimePrintContext can be optimized by escape an

Re: RFR: 8368172: Make java.time.format.DateTimePrintContext immutable

2025-09-20 Thread Roger Riggs
On Sat, 23 Aug 2025 11:27:55 GMT, Shaojin Wen wrote: > I propose to make j.t.f.DateTimePrintContext immutable. > > Currently, DateTimePrintContext has only one mutable field, optional. This > can be replaced by adding an optional parameter to the > DateTimeFormatter.formatTo method. > > Immut

Re: RFR: 8368172: Make java.time.format.DateTimePrintContext immutable

2025-09-20 Thread Stephen Colebourne
On Sat, 23 Aug 2025 11:27:55 GMT, Shaojin Wen wrote: > I propose to make j.t.f.DateTimePrintContext immutable. > > Currently, DateTimePrintContext has only one mutable field, optional. This > can be replaced by adding an optional parameter to the > DateTimeFormatter.formatTo method. > > Immut

Re: RFR: 8368172: Make java.time.format.DateTimePrintContext immutable

2025-09-19 Thread Chen Liang
On Sat, 23 Aug 2025 11:27:55 GMT, Shaojin Wen wrote: > I propose to make j.t.f.DateTimePrintContext immutable. > > Currently, DateTimePrintContext has only one mutable field, optional. This > can be replaced by adding an optional parameter to the > DateTimeFormatter.formatTo method. > > Immut