Professional Web Applications Themes

Effeciency question - perl scripts v's perl exe's - PERL Miscellaneous

Max Adams wrote: > Effeciency question - perl scripts v's perl exe's > > In our organisation we have a number of perl scripts which do various > things to word doents, (count lines, format w/ headers footers) > and other routine operations. My question is, is there any > performance gain to be had by compiling our scripts to executables > using perl2exe, and generally are there any performance benfits of > using perl executables instead of perl scripts? > > Also if anyone can point me to some statistics this would help a > great deal. The only ...

  1. #1

    Default Re: Effeciency question - perl scripts v's perl exe's

    Max Adams wrote:
    > Effeciency question - perl scripts v's perl exe's
    >
    > In our organisation we have a number of perl scripts which do various
    > things to word doents, (count lines, format w/ headers footers)
    > and other routine operations. My question is, is there any
    > performance gain to be had by compiling our scripts to executables
    > using perl2exe, and generally are there any performance benfits of
    > using perl executables instead of perl scripts?
    >
    > Also if anyone can point me to some statistics this would help a
    > great deal.
    The only existing Perl compiler is part of perl. Anything else is just a
    packager that puts a perl, required modules, and the application in an
    executable package. That won't give you any extra performance.

    There is a compiler, perlcc, that come with your perl. But it is
    experimental and generally doesn't work for applications of any
    reasonable size. You're better off writing Inline::C or XS extensions to
    speed up your application. (Or spend some time thinking about your
    algorithms. That's usually the best idea.)

    HTH,
    Steffen
    --
    n=([283488072,6076],[2105905181,8583184],[1823729722,9282996],[281232,
    1312416],[1823790605,791604],[2104676663,884944]);$b=6;c=' -/\_|'=~/./g
    ;for(n){for$n($_){map{$h=int$n/$b**$_;$n-=$b**$_*$h;$c[c]=$h}reverse
    0..11;pushp,map{$c[$_]}c[reverse$b..$#c];$#c=$b-1}$p[p]="\n"}printp;

    Steffen Müller Guest

  2. #2

    Default Re: Effeciency question - perl scripts v's perl exe's

    In article <bil71e$9ote2$1ID-116287.news.uni-berlin.de>,
    Max Adams <rubberducky703hotmail.com> wrote:

    : Effeciency question - perl scripts v's perl exe's
    : [...]

    If you're experiencing performance problems, you're almost certain
    to get more bang-for-buck by improving your algorithms rather than
    chasing down this path, especially given the I/O-bound process you
    described.

    To put it in MBAese, attack the common cause, not a perceived special
    cause. (It makes me feel dirty to even think in such filthy language.)

    Greg
    --
    Human ingenuity, not government, solves the problem of scarcity. The
    nations in which poverty is greatest are those that restrain human
    ingenuity -- that is, freedom -- and punish initiative.
    -- Wendy McElroy
    Greg Bacon Guest

  3. #3

    Default Re: Effeciency question - perl scripts v's perl exe's

    Steffen Müller wrote at Thu, 28 Aug 2003 19:16:53 +0200:
    >> In our organisation we have a number of perl scripts which do various
    >> things to word doents, (count lines, format w/ headers footers)
    >> and other routine operations. My question is, is there any
    >> performance gain to be had by compiling our scripts to executables
    >> using perl2exe, and generally are there any performance benfits of
    >> using perl executables instead of perl scripts?
    >>
    >> Also if anyone can point me to some statistics this would help a
    >> great deal.
    >
    > The only existing Perl compiler is part of perl. Anything else is just a
    > packager that puts a perl, required modules, and the application in an
    > executable package. That won't give you any extra performance.
    And in addition, even if there would be a reliable, good Perl compiler, it
    would not result in a great speed advantage. perl compiles a script into
    an internal opcode tree. Unlike the equavilent idea of the Java Virtual
    Machines, the opcodes are quite complex (e.g. a grep is an own opcode
    IIRC), thus some large code blocks (at least in other languages the code
    blocks would be also large in the script) are usually already compiled to
    opcodes. One affect is that it is much more complex to write a perl (one
    of the reason why there is only one), but another is that the gain penalty
    of interpreted code is only some percent, not some times.

    The only way to increase speed with compilation is to avoid it. That's the
    way mod_perl works (quick).


    Greetings,
    Janek
    Janek Schleicher Guest

Similar Threads

  1. Perl and Java scripts
    By Patrik Rask in forum PERL Modules
    Replies: 3
    Last Post: February 5th, 08:44 AM
  2. Perl scripts interconnectivity... Is it possible...
    By Roman Khutkyy in forum PERL Miscellaneous
    Replies: 4
    Last Post: August 14th, 01:16 AM
  3. Perl / Cgi scripts in colour
    By Jared in forum Macromedia Dreamweaver
    Replies: 2
    Last Post: August 4th, 05:00 AM
  4. ENV variables in perl scripts called from perl.
    By Sandman in forum PHP Development
    Replies: 2
    Last Post: July 29th, 10:58 AM
  5. include ASP scripts in PERL
    By Richard Gration in forum PERL Miscellaneous
    Replies: 1
    Last Post: July 2nd, 05:36 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139