Because to be useful, you generally have to do something more than just print the path out as a string.
To make it useful, you'd have to either:
- accumulate all the paths as (say) an array of arrays:
5 million paths with an average of roughly 20 items per.
- or turn it into an iterator, so the code using the routines results can operate on the one at a time.
Which is what I did with mine.
- or; write all 5 million paths to disk as strings and then read them all back in again.
In addition to the ovrhead of the IO, you also have to join them and then split them again.
I'd try your routine here,but I can't work out where I supply the start and end?