I was under the impression (probably miss guided) that Perl compiled scripts and stored the compiled code somewhere/somehow. If the modification time of the script hadn't changed it would subsequently not need to recompile every time the script was run.

I see some references to compiled Perl scripts but this primarily appears to be around avoiding having to rely on Perl on destination systems.

Are there ways of getting my code to execute faster?

perl -d:DProf ./test.pl 198.19.28.102 user password -d; dprofpp; { "data": [ { "{#BGPPEER}": "African Bank - HO - Neotel" }, { "{#BGPPEER}": "African Bank - HO - Teraco" }, { "{#BGPPEER}": "African Bank - Neotel - Midrand" }, { "{#BGPPEER}": "Liquid Telecoms - A" }, { "{#BGPPEER}": "Liquid Telecoms - B" } ] } Total Elapsed Time = 0.354916 Seconds User+System Time = 0.304916 Seconds Exclusive Times %Time ExclSec CumulS #Calls sec/call Csec/c Name 13.1 0.040 0.040 138 0.0003 0.0003 Class::MOP::Method::Gener +ated::_eval_closure 9.84 0.030 0.026 23 0.0013 0.0011 Moose::Util::TypeConstrai +nts::BEGIN 6.56 0.020 0.020 4 0.0050 0.0050 B::Hooks::EndOfScope::BEG +IN 6.56 0.020 0.038 15 0.0013 0.0026 Class::MOP::BEGIN 6.56 0.020 0.213 24 0.0008 0.0089 Moose::BEGIN 6.56 0.020 0.019 176 0.0001 0.0001 Class::MOP::Mixin::HasAtt +ributes::has_attribute 6.23 0.019 0.018 258 0.0001 0.0001 Class::MOP::Class::Immuta +ble::Class::MOP::Class::get_meta_instance 6.23 0.019 0.019 1106 0.0000 0.0000 Class::MOP::get_metaclass +_by_name 6.23 0.019 0.019 1062 0.0000 0.0000 Class::MOP::Package::_pac +kage_stash 5.90 0.018 0.018 1712 0.0000 0.0000 Package::Stash::PP::_deco +nstruct_variable_name 5.25 0.016 0.031 1168 0.0000 0.0000 Package::Stash::PP::get_s +ymbol 3.28 0.010 0.010 1 0.0100 0.0100 Net::SSLeay::load_error_s +trings 3.28 0.010 0.010 1 0.0100 0.0100 Params::Util::bootstrap 3.28 0.010 0.010 6 0.0017 0.0016 IO::Socket::BEGIN 3.28 0.010 0.010 14 0.0007 0.0007 Package::Stash::PP::BEGIN

In reply to Pre-compiled Perl? by bbs2web

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.