On Fri, 12 May 2000, Minh Van wrote:

>
> is perl faster than awk & postscript ?

Generally yes. Awk is an interpreter, while perl is an interpreter with
a precompile phase. Startup times for perl are longer because it parses
the perl input, precompiles it in memory and then runs the compiled
memory image. The running of the precompiled image should be faster than
awk for all but the most trivial cases.

As for PostScript, it depends on what RIP you are using. If its
ghostscript it will probably by slower that perl but it really depends
on what you're doing. If you're using PostScript to do pattern
matching on a stream of input then Perl will probably be faster. If
you're using Perl to RIP PostScript into Epson ESC/2 then ghostscript
will probably be faster.

There are faster commercial PostScript RIPS available. For instance,
a company in the UK called 5D sells one called JAWS.

What are you trying to do?

PS If you feel more comfortable with awk, you can always convert your
awk code to perl using a2p. It may not be as efficient as something
written in perl to begin with, but it will run faster than your awk
script.

Regards
Peter
----------
Peter Samuel                                [EMAIL PROTECTED]
Technical Consultant                        or at present:
eServ. Pty Ltd                              [EMAIL PROTECTED]
Phone: +61 2 9206 3410                      Fax: +61 2 9281 1301

"If you kill all your unhappy customers, you'll only have happy ones left"

--
SLUG - Sydney Linux Users Group Mailing List - http://www.slug.org.au
To unsubscribe send email to [EMAIL PROTECTED] with
unsubscribe in the text

Reply via email to