Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!convex!convex.COM From: tchrist@convex.COM (Tom Christiansen) Newsgroups: comp.lang.perl Subject: Re: Perl run-time image dumping Message-ID: <100774@convex.convex.com> Date: 22 Mar 90 14:28:37 GMT References: <15230@bfmny0.UU.NET> <15232@bfmny0.UU.NET> <1118@etnibsd.UUCP> <1990Mar16.010322.18464@tc.fluke.COM> <100628@convex.convex.com> <903@surf.sics.bu.oz> Sender: news@convex.com Reply-To: tchrist@convex.COM (Tom Christiansen) Organization: CONVEX Software Development, Richardson, TX Lines: 43 In article <903@surf.sics.bu.oz> eay@surf.sics.bu.oz (Eric the Young) writes: >If the time taken during startup is the parsing, surely perl could >be made to dump an image of the compiled program (pl-code :-) that could >be reloaded very quickly with minimal parsing. If the file was acsii >it could still be invoked via #!/bin/perl -pl_code_flag on the first line. >A 500 line perl script becomes n lines of semi-random-ascii. >How much of a saving this would be I don't know, since I don't have >undump and I have not done any profiling on large perl >scripts (yet :-) to find out the startup costs. Here are some random timings from a Convex C1: % ll /usr/bin/perl man man.perldump -rwxrwxr-x 1 root 466288 Mar 16 04:55 /usr/bin/perl -rwxr-xr-x 1 tchrist 18901 Mar 21 21:44 man -rwxrwxr-x 1 tchrist 777584 Mar 21 22:01 man.perldump % wc man 776 2425 18901 man # plus 74 lines of include files (getopts and stat) % time ./man -v ./man: version is "man 0.7 90/03/21 21:41:51" 1.2u 0.3s 0:03 51% 0+0k 51+0io 112pf+0w % time ./man.perldump -v ./man: version is "man 0.7 90/03/21 21:41:51 (compiled)" 0.0u 0.2s 0:00 650% 0+0k 0+0io 44pf+0w While on a C2 0.3+0.1 for the interpreted version (better stated: the freshly parsed) and 0+0 on the other one. One second is just enough of a delay to start to bother me. However, I find that the initial load of the dumped version sometimes takes a LONG time, although this is reflected only in the real, not the user or system time. I sure do like Eric's idea here though. perl4? --tom -- Tom Christiansen {uunet,uiucdcs,sun}!convex!tchrist Convex Computer Corporation tchrist@convex.COM "EMACS belongs in : Editor too big!"