Re:Performance patches in Go 1.11
by Scaevolus on Friday June 22, 2018 @02:48PM
(#17376361)
There are more optimizations than that that you could probably use if you want fast ReadDir.
Golang's ReadDir reads directory entries, stats all files, and sorts the list. If all you want is the directory entries directly, try godirwalk (also much faster for walking!): https://godoc.org/github.com/karrick/godirwalk#ReadDirents
Golang's ReadDir reads directory entries, stats all files, and sorts the list. If all you want is the directory entries directly, try godirwalk (also much faster for walking!): https://godoc.org/github.com/karrick/godirwalk#ReadDirents