This still does not explain the original results. I think that even with the glob in the loop, the Schwartzian transform should be faster. (I couldn't reproduce those results, the Schwartzian was faster for me even with your original code.)
One thing, If I used "/usr/bin" or any other path with a '/' in the middle it went haywire.
That's wierd.
In reply to Re^3: Benchmark, -s versus schwartzian
by ambrus
in thread Benchmark, -s versus schwartzian
by Darby
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |