go/src/time
apocelipes 819b1b4575 time: implement the encoding.(Binary|Text)Appender for Time
"Time.Marshal(Binary|Text)" could also gain some performance
improvements. Here is the benchmark highlight:

                │     old      │                 new                 │
                │    sec/op    │   sec/op     vs base                │
MarshalText-8     104.00n ± 3%   67.27n ± 2%  -35.32% (p=0.000 n=10)
MarshalBinary-8    31.77n ± 2%   12.13n ± 1%  -61.82% (p=0.000 n=10)
geomean            57.48n        28.57n       -50.30%

                │    old     │                  new                   │
                │    B/op    │   B/op     vs base                     │
MarshalText-8     48.00 ± 0%   0.00 ± 0%  -100.00% (p=0.000 n=10)
MarshalBinary-8   16.00 ± 0%   0.00 ± 0%  -100.00% (p=0.000 n=10)

                │    old     │                   new                   │
                │ allocs/op  │ allocs/op   vs base                     │
MarshalText-8     1.000 ± 0%   0.000 ± 0%  -100.00% (p=0.000 n=10)
MarshalBinary-8   1.000 ± 0%   0.000 ± 0%  -100.00% (p=0.000 n=10)

For #62384

Change-Id: I320421878a341abf8d668fd57b27292cdfa61330
GitHub-Last-Rev: e04f8df9c2
GitHub-Pull-Request: golang/go#68942
Reviewed-on: https://go-review.googlesource.com/c/go/+/606655
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
2024-08-20 16:48:48 +00:00
..
testdata
tzdata
abs_test.go time: optimize time <-> date conversions 2024-07-31 21:29:46 +00:00
embed.go
example_test.go time: fix typo in ExampleParseDuration 2024-02-13 01:05:00 +00:00
export_android_test.go
export_test.go
export_windows_test.go
format.go time: optimize time <-> date conversions 2024-07-31 21:29:46 +00:00
format_rfc3339.go time: optimize time <-> date conversions 2024-07-31 21:29:46 +00:00
format_test.go time: fix time zone parsing when format includes time zone seconds 2024-07-02 20:01:50 +00:00
genzabbrs.go all: change from sort functions to slices functions where feasible 2024-05-23 01:00:11 +00:00
internal_test.go time: time/internal_test.go remove redundant type conversion 2024-06-03 14:56:37 +00:00
linkname_test.go time: optimize time <-> date conversions 2024-07-31 21:29:46 +00:00
mono_test.go
sleep.go time: fix some typos in CL 512355 2024-08-02 14:34:04 +00:00
sleep_test.go runtime: add fast path for (*timers).adjust 2024-03-22 16:33:57 +00:00
sys_plan9.go
sys_unix.go
sys_windows.go
tick.go time: add available godoc link 2024-04-04 14:21:30 +00:00
tick_test.go time: correct spelling, queing -> queuing 2024-06-11 17:10:37 +00:00
time.go time: implement the encoding.(Binary|Text)Appender for Time 2024-08-20 16:48:48 +00:00
time_test.go time: implement the encoding.(Binary|Text)Appender for Time 2024-08-20 16:48:48 +00:00
tzdata_test.go
zoneinfo.go time: optimize time <-> date conversions 2024-07-31 21:29:46 +00:00
zoneinfo_abbrs_windows.go
zoneinfo_android.go
zoneinfo_android_test.go
zoneinfo_goroot.go
zoneinfo_ios.go
zoneinfo_js.go
zoneinfo_plan9.go
zoneinfo_read.go cmd/link: disallow pull-only linknames 2024-05-15 19:57:43 +00:00
zoneinfo_test.go
zoneinfo_unix.go
zoneinfo_unix_test.go
zoneinfo_wasip1.go
zoneinfo_windows.go
zoneinfo_windows_test.go