<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 8 March 2015 at 13:31, Ben Hoyt <span dir="ltr"><<a href="mailto:benhoyt@gmail.com" target="_blank">benhoyt@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Thanks for committing this, Victor! And fixing the d_type issue on funky platforms.<div><br></div><div>Others: if you want to benchmark this, the simplest way is to use my os.walk() benchmark.py test program here: <a href="https://github.com/benhoyt/scandir" target="_blank">https://github.com/benhoyt/scandir</a> -- it compares the built-in os.walk() implemented with os.listdir() with a version of walk() implemented with os.scandir(). I see huge gains on Windows (12-50x) and modest gains on my Linux VM (3-5x).</div><div><br></div><div>Note that the actual CPython version of os.walk() doesn't yet use os.scandir(). I intend to open a separate issue for that shortly (or Victor can). But that part should be fairly straight-forward, as I already have a version available in my GitHub project.</div></div></blockquote><div><br></div><div>I think it would be a good idea to report the type of drive/mount along with the results. I imagine that there might be significant differences between solid state drives, hard drives and network mounts.</div><div><br></div><div>Tim Delaney</div></div></div></div>