It's basically limited by the amount of memory on your machine.
On a Windows XP PC with 1 gigabyte of main memory and a Pentium IV, I can sort two million 24-bytes strings in just over half a minute, but trying to sort four million caused major thrashing (the whole machine slows to a crawl) followed by Perl dying with "out of memory."
Fifty thousand filenames shouldn't be a problem on reasonably recent machines.
perl -wle '@a=(1..2_000_000); @b=sort map {scalar gmtime $_} @a; print
+ "@b[0,1,2,1_999_997,1_999_998,1_999_999]"'
Fri Jan 2 00:00:00 1970 Fri Jan 2 00:00:01 1970 Fri Jan 2 00:00:02
+1970 Wed Jan 21 23:59:57 1970 Wed Jan 21 23:59:58 1970 Wed Jan 21 23:
+59:59 1970
34.42user 0.32system 0:35.76elapsed 97%CPU (0avgtext+0avgdata 29949952
+maxresident)k
0inputs+0outputs (122789major+0minor)pagefaults 0swaps
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.