greatroar
8a1e54d58a
lib/fs: Optimize Canonicalize
...
When pathSep is a constant, the compiler precomputes pathSep+pathSep and
".."+pathSep instead of emitting function calls to compute "//" and
"../". Benchmark results in lib/osutil:
name old time/op new time/op delta
TraversesSymlink-8 8.86µs ± 3% 8.53µs ± 4% -3.79% (p=0.000 n=18+20)
name old alloc/op new alloc/op delta
TraversesSymlink-8 1.06kB ± 0% 1.06kB ± 0% ~ (all equal)
name old allocs/op new allocs/op delta
TraversesSymlink-8 15.0 ± 0% 15.0 ± 0% ~ (all equal)
2021-11-23 21:25:29 +01:00
..
2021-08-17 10:10:41 +02:00
2021-08-17 10:10:41 +02:00
2021-08-17 10:10:41 +02:00
2021-08-17 10:10:41 +02:00
2020-08-07 07:47:48 +02:00
2021-08-17 10:10:41 +02:00
2020-05-13 21:46:24 +02:00
2021-08-17 10:10:41 +02:00
2021-08-17 10:10:41 +02:00
2021-08-17 10:10:41 +02:00
2021-11-22 08:59:47 +01:00
2021-08-17 10:10:41 +02:00
2021-08-17 10:10:41 +02:00
2021-08-17 10:10:41 +02:00
2021-08-17 10:10:41 +02:00
2021-08-17 10:10:41 +02:00
2021-08-17 10:10:41 +02:00
2021-08-17 10:10:41 +02:00
2021-08-17 10:10:41 +02:00
2021-08-17 10:10:41 +02:00
2021-11-22 08:59:47 +01:00
2021-08-17 10:10:41 +02:00
2021-08-17 10:10:41 +02:00
2021-08-17 10:10:41 +02:00
2021-08-17 10:10:41 +02:00
2021-05-03 11:28:25 +01:00
2021-05-03 11:28:25 +01:00
2021-08-01 22:44:49 +02:00
2020-08-25 08:11:14 +02:00
2020-10-02 08:07:05 +02:00
2021-08-17 10:10:41 +02:00
2021-02-20 14:56:45 +01:00
2019-10-04 13:03:34 +02:00
2021-05-03 11:28:25 +01:00
2021-11-22 08:59:47 +01:00
2021-11-22 08:59:47 +01:00
2020-06-18 22:32:26 +01:00
2020-06-18 08:15:47 +02:00
2021-11-22 08:59:47 +01:00
2020-06-18 08:15:47 +02:00
2019-04-22 11:12:32 +02:00
2021-11-23 21:25:29 +01:00
2021-05-17 20:43:07 +02:00
2021-05-17 20:43:07 +02:00
2021-05-03 11:28:25 +01:00
2021-11-22 08:59:47 +01:00
2021-05-17 12:35:03 +02:00
2021-08-29 10:47:53 +02:00
2021-08-29 10:47:53 +02:00
2020-08-25 08:11:14 +02:00
2020-10-02 08:07:05 +02:00
2021-11-23 21:25:29 +01:00
2021-11-23 21:25:29 +01:00
2021-03-11 15:23:56 +01:00
2021-05-03 11:28:25 +01:00