Lots of good advice here in other comments, but I wanted to add some information directly about the question you asked.

(BTW, most of this is generic info that you should run your own experiments with, because I have never specifically tested this with perl)

Most code written in C is compiled using settings that make it reasonably fast, but compatible with the widest variety of hardware it might run on. The pre-compiled Strawberry perl you download probably is compiled to run on any x86-64 processor since the original release of the architecture 15-20 years ago. It may include special GCC detection of your hardware that enables faster versions of functions like memcpy using newer parallel vector instructions, but probably doesn't.

If you want the absolute fastest possible generated instructions for your processor, you need to tell gcc the flags "-march=native" and "-mtune=native" as it is compiling the code. These are probably not selectable options from any of the standard perl compilation scripts, but you can probably do something like make CFLAGS="-O2 -march=native -mtune=native" to make it happen. Check the full output of the compilation to see what actual gcc commands get run as a result. You might even try -O3 but given the crazy tricks that Perl source code plays, I expect that to just break things. But of course, you can just run the unit tests to find out if it broke.

Using -march=native means that the generated binary might only be able to run on your specific processor, so don't expect to be able to use it on any physical machine other than that one.

But also, I'd be really interested to see benchmark results if you do try this!


In reply to Re: Windows precompiled binaries or DIY compile by NERDVANA
in thread Windows precompiled binaries or DIY compile by ObiPanda

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.