[Python-ideas] BetterWalk, a better and faster os.walk() for Python

Stefan Drees stefan at drees.name
Thu Nov 22 23:27:19 CET 2012


maybe of interest 64-bit Intel based osx system and the filesystem is 
hfs, local and journaled on a fully encrypted account.

Am 22.11.12 23:17, schrieb Stefan Drees:
> Hi Ben,
>
> ...
> With Python 3.3.0:
>
>   + depth=4, num_dirs=5, num_files=50
>     os.walk took 0.122s, BetterWalk took 0.076s -- 1.6x as fast
>
>   + depth=4, num_dirs=5, num_files=100
>     os.walk took 0.142s, BetterWalk took 0.098s -- 1.4x as fast
>
>   + depth=4, num_dirs=10, num_files=50
>     os.walk took 0.840s, BetterWalk took 0.634s -- 1.3x as fast
>
>   + depth=5, num_dirs=5, num_files=50
>     os.walk took 0.617s, BetterWalk took 0.446s -- 1.4x as fast
>
> With Python 2.7.3:
>
>   + depth=4, num_dirs=5, num_files=50
>     os.walk took 0.060s, BetterWalk took 0.059s -- 1.0x as fast
>
>   + depth=4, num_dirs=5, num_files=100
>     os.walk took 0.121s, BetterWalk took 0.136s -- 0.9x as fast
>
>   + depth=4, num_dirs=10, num_files=50
>     os.walk took 0.658s, BetterWalk took 0.664s -- 1.0x as fast
>
>   + depth=5, num_dirs=5, num_files=50
>     os.walk took 0.473s, BetterWalk took 0.506s -- 0.9x as fast
>
> ...



More information about the Python-ideas mailing list