on the same files, and my results are:time perl -pe '$r = substr(rand(), 2); $_ = "$r\t$_"' input | sort -n +| cut -f 2- > dev/null
nr of lines real user sys
100 0m 0.010s 0m 0.010s 0m 0.000s
1000 0m 0.051s 0m 0.010s 0m 0.030s
10000 0m 0.264s 0m 0.180s 0m 0.040s
100000 0m 2.608s 0m 1.640s 0m 0.140s
1000000 0m40.640s 0m17.550s 0m 1.060s
10000000 17m14.639s 3m30.830s 0m27.200s
In reply to Re^5: Strategy for randomizing large files via sysseek
by Anonymous Monk
in thread Strategy for randomizing large files via sysseek
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |