True to the PEP, this reduces the number of syscalls by roughly 1/3 on Linux.
I used strace -f at2 scan|& grep <scanned path> | wc -l to count the number of syscalls for a directory with 18155 files and 2101 directories (20256 entries total). On master, 58666 syscalls were issued, and with this change the new count is exactly 20256.
True to the PEP, this reduces the number of syscalls by roughly 1/3 on Linux.
I used
strace -f at2 scan|& grep <scanned path> | wc -l
to count the number of syscalls for a directory with 18155 files and 2101 directories (20256 entries total). On master, 58666 syscalls were issued, and with this change the new count is exactly 20256.It can be merged completely independently of #41