]> Cypherpunks repositories - gostls13.git/commit
time: make Duration.String inlineable
authorJoe Tsai <joetsai@digital-static.net>
Fri, 18 Aug 2023 01:13:01 +0000 (18:13 -0700)
committerGopher Robot <gobot@golang.org>
Fri, 18 Aug 2023 23:45:44 +0000 (23:45 +0000)
commita9859a7df72a8ca9686b4fb939989c04b42804fe
treeeab526780c6cd2cbafc5666b6d87007408abbd7e
parentba7ba9bcc0e755f2c072d308e1c9f79bb2564e03
time: make Duration.String inlineable

Perform the [32]byte to string conversion in an inlinable method.
Thus, if the result does not escape in the context of the caller,
we can entirely avoid a call to runtime.slicebytetostring.

Change-Id: Iae8ec2a532776ed6cf99597f19e3f7f21c694c3a
Reviewed-on: https://go-review.googlesource.com/c/go/+/520602
Run-TryBot: Joseph Tsai <joetsai@digital-static.net>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Auto-Submit: Joseph Tsai <joetsai@digital-static.net>
Reviewed-by: Ian Lance Taylor <iant@google.com>
src/time/time.go