Search Perl pages
Professions, Sciences, Humanities, Business, ...
Text-based, GUI, Audio, Video, Keyboards, Mouse, Images,...
Conversions, tests, processing, manipulation,...
Integer, Floating point, Matrix, Statistics, Boolean, ...
Algorithms, Memory, Process control, Debugging, ...
Data storage, Integrity, Encryption, Compression, ...
Networks, protocols, Interprocess, Remote, Client Server, ...
Timing, Calendar and Clock, Audio, Video, Printer, Controls...
Management, Filtering, File & Directory access, Viewers, ...
Next: How can I get '#!perl' to work on [MS-DOS,NT,...]?
Malcolm Beattie has written a multifunction backend compiler, available from
CPAN, that can do both these things. It is as of Feb-1997 in late alpha release, which means it's fun to play with if you're a programmer but not really for people looking for turn-key solutions.
Please understand that merely compiling into
C does not in and of itself guarantee that your code will run very much faster. That's because except for lucky cases where a lot of native type inferencing is possible, the normal Perl run time system is still present and thus will still take just as long to run and be just as big. Most programs save little more than compilation time, leaving execution no more than 10-30% faster.
A few rare programs actually benefit significantly (like several times faster), but this takes some tweaking of your code.
Malcolm will be in charge of the 5.005 release of Perl itself to try to
unify and merge his compiler and multithreading work into the main release.
You'll probably be astonished to learn that the current version of the
compiler generates a compiled form of your script whose executable is just
as big as the original perl executable, and then some. That's because as
currently written, all programs are prepared for a full
statement. You can tremendously reduce this cost by building a shared
libperl.so library and linking against that. See the
INSTALL podfile in the perl source distribution for details. If you link your main
perl binary with this, it will make it miniscule. For example, on one
author's system, /usr/bin/perl is only 11k in size!
Source: Perl FAQ: Programming Tools
Copyright: Copyright (c) 1997 Tom Christiansen and Nathan Torkington.
Previous: How can I hide the source for my Perl program?
(Corrections, notes, and links courtesy of RocketAware.com)
Up to: PERL
Search | About | Comments | Submit Path: RocketAware > Perl >
RocketAware.com is a service of Mib Software
Copyright 2000, Forrest J. Cavalier III. All Rights Reserved.
We welcome submissions and comments