What can i do to run perl faster

If you properly modularized your code, profiling it should be easy. If it's code that will only run in mod_perl, profiling it will be very hard. Several profiling modules are available. Search CPAN.

why php is faster than perl

I've found it very hard to find PHP scripts that didn't have faster Perl equivalents. But for static pages, that is: pages with no content, PHP certainly is faster than a Perl script that prints the same text, even if $r->print is used. I do not know why this is, and have no urge to find out. It shouldn't matter anyway, because for static pages, you don't need to use a programming language.

is php is better than perl?

Certainly not. PHP is much, much worse than Perl. Please read http://tnx.nl/php.txt for a comparison of some very important aspects.

php have too many function in your own core just like session, and on perl i have to create this

No, you don't have to re-invent the wheel. Others have coded things like support for sessions. All you need to do is install a module and learn to use it. It's probably a bit more work to get the session ID across, but in return you get all the flexibility you could ask for.

hth

Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }


In reply to Re: PHP is better than perl and what can i do to run perl faster? by Juerd
in thread PHP is better than perl and what can i do to run perl faster? by eial

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.