Perl - Comparative Performance

Comparative Performance

The Computer Language Benchmarks Game, a project hosted by Alioth, compares the performance of implementations of typical programming problems in several programming languages. The submitted Perl implementations typically perform toward the high end of the memory-usage spectrum and give varied speed results. Perl's performance in the benchmarks game is typical for interpreted languages.

Large Perl programs start more slowly than similar programs in compiled languages because perl has to compile the source every time it runs. In a talk at the YAPC::Europe 2005 conference and subsequent article "A Timely Start", Jean-Louis Leroy found that his Perl programs took much longer to run than he expected because the perl interpreter spent much of the time finding modules because of his over-large include path. Unlike Java, Python, and Ruby, Perl has only experimental support for pre-compiling. Therefore Perl programs pay this overhead penalty on every execution. The run phase of typical programs is long enough that amortized startup time is not substantial, but benchmarks that measure very short execution times are likely to be skewed due to this overhead.

A number of tools have been introduced to improve this situation. The first such tool was Apache's mod_perl, which sought to address one of the most-common reasons that small Perl programs were invoked rapidly: CGI Web development. ActivePerl, via Microsoft ISAPI, provides similar performance improvements.

Once Perl code is compiled, there is additional overhead during the execution phase that typically isn't present for programs written in compiled languages such as C or C++. Examples of such overhead include bytecode interpretation, reference-counting memory management, and dynamic type-checking.

Read more about this topic:  Perl

Famous quotes containing the words comparative and/or performance:

    The hill farmer ... always seems to make out somehow with his corn patch, his few vegetables, his rifle, and fishing rod. This self-contained economy creates in the hillman a comparative disinterest in the world’s affairs, along with a disdain of lowland ways. “I don’t go to question the good Lord in his wisdom,” runs the phrasing attributed to a typical mountaineer, “but I jest cain’t see why He put valleys in between the hills.”
    —Administration in the State of Arka, U.S. public relief program (1935-1943)

    When a book, any sort of book, reaches a certain intensity of artistic performance it becomes literature. That intensity may be a matter of style, situation, character, emotional tone, or idea, or half a dozen other things. It may also be a perfection of control over the movement of a story similar to the control a great pitcher has over the ball.
    Raymond Chandler (1888–1959)