mirror of
https://github.com/octoleo/syncthing.git
synced 2025-01-24 07:28:27 +00:00
8a1e54d58a
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)