You said: "the script in windows (along with some other pre and post processing) took about 25 seconds ..and on linux it took 135 seconds". Is this based off of the wall-clock? Or did you actually benchmark the code (use Benchmark;)? Wall-clock times are notorious for varying all over the map, depending on what else is running on the machine.

I had a 'Lead Programming Manager' once tell me that he'd "benchmarked some RPC code I wrote and it was giving him unacceptable response times" -- thirty seconds between the time he pressed the enter key and the time the browser got updated. After some investigation, I found the bug. It seems that there was a small error with his lap-top's DNS configuration. The first two DNS-servers in his authoritative list were non-existent, due to transposition errors, and the DNS time-out was set to 15 seconds. Once we fixed that, the response time he measured was sub-second. An actual benchmark gave 0.2 seconds from start to finish. (That was about his reaction time, pushing the start/stop timer button on his wrist-watch....)

When you start saying things about program timings, you have to be sure that you are really measuring the code's performance and not side-effects of the other things on the Machine.

----
I Go Back to Sleep, Now.

OGB


In reply to Re: why filling Hash seems slower on unixes than windows ? by Old_Gray_Bear
in thread why filling Hash seems slower on unixes than windows ? by vmpilgrim

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.