Files
restic/internal
greatroar 49e32f3f8a ui/termstatus: Optimize Truncate
x/text/width.LookupRune has to re-encode its argument as UTF-8,
while LookupString operates on the UTF-8 directly.
The uint casts get rid of a bounds check.

Benchmark results, with b.ResetTimer introduced first:

name               old time/op  new time/op  delta
TruncateASCII-8    69.7ns ± 1%  55.2ns ± 1%  -20.90%  (p=0.000 n=20+18)
TruncateUnicode-8   350ns ± 1%   171ns ± 1%  -51.05%  (p=0.000 n=20+19)
2023-04-14 11:13:39 +02:00
..
2022-07-17 13:42:23 +02:00
2022-10-14 14:06:47 +02:00
2023-01-14 20:41:07 +01:00
2023-01-27 03:21:37 +11:00
2023-04-14 11:13:39 +02:00