[% setvar title Precompiled Perl scripts. %]

This file is part of the Perl 6 Archive

Note: these documents may be out of date. Do not use as reference!

To see what is currently happening visit http://www.perl6.org/

TITLE

Precompiled Perl scripts.

VERSION

  Maintainer: Slava Pechenin <slava@baltica.ru>
  Date: 29 Aug 2000
  Mailing List: perl6-internals@perl.org
  Number: 172
  Version: 1
  Status: Developing

ABSTRACT

The functionality to store/load precompiled perl scripts may be built into the core.

DESCRIPTION

There exists a possibility to do the thing. One can store compiled perl code in file and load it again via B::Bytecode. But the produced file is large. The loading time is comparable to compiling the code anew. Several simple experiments show that disk i/o times does not affect too much - almost all data are in cache. The B extension mechanisms and algorithms are too slow. Therefore it is unusable.

Why bother? Consider the script that uses xml/xsl. It takes a lot of time to get such a script running. And the debugging process becomes harder with annoying initialization (every single .pm must be read by OS from numeric files and compiled from the very beginning). Another example is web server. Why loose CPU time to compile the same scripts?

IMPLEMENTATION

Perl may have an option to vary the target precompiled format. The format affects the generated precompiled file size. User may choose appropriate effective format to minimize loading time. It clearly depends on the system which runs the script.

REFERENCES

none