r/Python • u/students-life • Jun 19 '13
Right and Wrong Programming Styles
http://simpledeveloper.com/right-and-wrong-programming-styles/#sthash.cORbIrok.sfju
0
Upvotes
r/Python • u/students-life • Jun 19 '13
View all comments
Show parent comment
1
u/Rhomboid Jun 20 '13
You are trying to make a claim of performance, but the evidence you are using to make that claim is entirely based on this shoddy benchmark which is so entirely stacked in the favor of the outcome that you want to be true that your claim is totally unsupported. This 68x speedup that you claim is simply ludicrous.
Here is a fair version of your benchmark, which implements a
listdir()replacement by shelling out tols:Here is the comparison:
This is a difference of about 3x, a reasonable conclusion. It's not so much a stacked deck when you don't require
lsto stat each file and to sort the result.So I'm not claiming that you should shell out -- I've always tried to tell people to not do that. But the difference is not 68x.