speed comparison of Perl to exe solutions

D

drleeds

I am working on a program which I am giving to people who use only
Windows machines and do not want to know anything about installing Perl
or modules.

I am using the pp tool that comes with Par to create the exe. My
program uses Strawberry Perl and an assortment of modules, like
WWW::Mechanize, HTML::TreeBuilder, HTML::Template, File::Slurp. I am
planning to possibly use Date::Manip and maybe others. I wanted to use
Win32::printer, but I could not get Strawberry Perl to install it, even
with force.

The .exe version of the program runs a little slower than I was hoping
it would. I have not formally timed it, but it seems like the .pl
version runs faster. It is hard to tell because the program depends on
network conditions.

Is there a difference in the speed of execution of Windows executables
created by the various Perl to exe solutions? ActiveState, Par or one
of the other two or more other solutions?

I am not sure how these programs do what they do and if it is very
different from one to another. Thank you for any advice on this matter.
 
J

John Bokma

I am working on a program which I am giving to people who use only
Windows machines and do not want to know anything about installing Perl
or modules.

I am using the pp tool that comes with Par to create the exe. My
program uses Strawberry Perl and an assortment of modules, like
WWW::Mechanize, HTML::TreeBuilder, HTML::Template, File::Slurp. I am
planning to possibly use Date::Manip and maybe others. I wanted to use
Win32::printer, but I could not get Strawberry Perl to install it, even
with force.

The .exe version of the program runs a little slower than I was hoping
it would. I have not formally timed it, but it seems like the .pl
version runs faster. It is hard to tell because the program depends on
network conditions.

Odd. I thought that par did nothing else then wrapping perl.exe and some
modules in a compressed file?
Is there a difference in the speed of execution of Windows executables
created by the various Perl to exe solutions? ActiveState, Par or one
of the other two or more other solutions?

I am not sure how these programs do what they do and if it is very
different from one to another. Thank you for any advice on this matter.

No experience with perl2exe. I recall that the end result of the latter is
much smaller, but I have no idea what they exactly do.
 
J

John Bokma

Kevin Michael Vail said:
It does the same basic thing as PAR and pp. Depending on options you
give it, it can either (a) just put everything in one big .exe file,


I never saw perl2exe, but I was given a perl2exe generated file + the Perl
source etc. I recall that PAR generated exe's are around 2 MB for
starters, and I recall that the exe I got was 700 kb. I have no idea if
that was because of (b) or (c) :)

(b) put everything but the Perl DLL in the big .exe file, or (c) put
everything but all DLLs in the big .exe file. In (b) and (c), it
I like it better than PAR/pp because of the DLL-copying thing, but
that could just be because I've been using it longer and haven't had
time to really get things working. To my mind, the ability to add
comments to make sure modules get included is a big win; as far as I
know, pp make you add command line options for each additional module.

Which I like more :) You can also add more "use" lines.
 
S

smueller

Is there a difference in the speed of execution of Windows executables
created by the various Perl to exe solutions? ActiveState, Par or one
of the other two or more other solutions?

I am not sure how these programs do what they do and if it is very
different from one to another. Thank you for any advice on this matter.

These programs do very, very similar things. They all follow the
principle of putting all necessary dependencies into one big
executable. With the only exception of optionally not bundling certain
DLLs like the Perl DLL. In a couple of weeks, I might publish an
article on PAR which also talks about techniques for reducing the exe
size. Until then, I suggest you look at the PAR FAQ on par.perl.org. It
has a FAQ on the exe size.

As for execution speed, perlapp, perl2exe and PAR produced binaries
should have the exact same run-time performance. Loading new modules,
however, might be slightly (milliseconds, that is, well below the
measurement threshold for single events) slower for PAR than for the
alternatives. That is, however, usually a compile-time effect. On the
other hand, PAR should be a bit slower in the start-up phase. All of
these tools are slower in start-up than just running the .pl file with
an installed Perl. (They all extract the bundled code to some place.)

Other than the start-up penalty, all four solutions (PAR, perlapp,
perl2exe, perl foo.pl) should give equal performance.

HTH,
Steffen Müller
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top