mirror of https://github.com/golang/go.git
On darwin/cgo use readdir_r instead of syscall.ReadDirent() since the later is simulated and slow (see: golang/go#30933). Unlike CL 392094, this uses CGO instead of "//go:linkname" and assembly. goos: darwin goarch: arm64 FastWalk-10 68.9ms ±11% 20.7ms ± 2% -69.89% (p=0.008 n=5+5) name old alloc/op new alloc/op delta FastWalk-10 1.49MB ± 0% 1.51MB ± 0% +1.06% (p=0.008 n=5+5) name old allocs/op new allocs/op delta FastWalk-10 32.2k ± 0% 30.7k ± 0% -4.61% (p=0.016 n=5+4) Fixes golang/go#51356 Change-Id: Ia3afd06c8f14bd2036b2a1ea6e3cafbef81d3530 Reviewed-on: https://go-review.googlesource.com/c/tools/+/436780 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Heschi Kreinick <heschi@google.com> Reviewed-by: Robert Findley <rfindley@google.com> Run-TryBot: Robert Findley <rfindley@google.com> Auto-Submit: Heschi Kreinick <heschi@google.com> gopls-CI: kokoro <noreply+kokoro@google.com> |
||
|---|---|---|
| .. | ||
| fastwalk.go | ||
| fastwalk_darwin.go | ||
| fastwalk_dirent_fileno.go | ||
| fastwalk_dirent_ino.go | ||
| fastwalk_dirent_namlen_bsd.go | ||
| fastwalk_dirent_namlen_linux.go | ||
| fastwalk_portable.go | ||
| fastwalk_test.go | ||
| fastwalk_unix.go | ||