On macOS, exiting the script requires 15 additional seconds. This is a great test case for comparing "my" vs "our".
my (%by_count, %by_word); # slow cleanup/exiting
$ time perl choroba.pl big1.txt big2.txt big3.txt >cpp.tmp
start
get properties: 21 secs
sort + output: 25 secs
total: 46 secs
real 1m2.072s
user 1m0.182s
sys 0m1.885s
our (%by_count, %by_word); # fast cleanup/exiting
$ time perl choroba.pl big1.txt big2.txt big3.txt >cpp.tmp
start
get properties: 21 secs
sort + output: 25 secs
total: 46 secs
real 0m47.062s
user 0m45.505s
sys 0m1.549s
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.