[comp.unix.shell] sh and/or csh compilers?

rodgers@maxwell.mmwb.ucsf.edu (R. P. C. Rodgers, M.D.) (06/22/91)

Dear Netlanders,

I keep hearing rumors of the existence of compilers for various UNIX
shells, but have never come across one (or even an add for one).
Does anyone know of any such beast, or (better yet) have direct
experience with one?  How good are they, and do they significantly
improve execution time?

Thanks and Cheerio, Rick Rodgers
R. P. C. Rodgers, M.D.         (415)476-2957 (work) 664-0560 (home)
UCSF Laurel Heights Campus     UUCP: ...ucbvax.berkeley.edu!cca.ucsf.edu!rodgers
3333 California St., Suite 102 Internet: rodgers@maxwell.mmwb.ucsf.edu
San Francisco CA 94118 USA     BITNET: rodgers@ucsfcca

tchrist@convex.COM (Tom Christiansen) (06/22/91)

From the keyboard of rodgers@maxwell.mmwb.ucsf.edu (R. P. C. Rodgers, M.D.):
:I keep hearing rumors of the existence of compilers for various UNIX
:shells, but have never come across one (or even an add for one).
:Does anyone know of any such beast, or (better yet) have direct
:experience with one?  How good are they, and do they significantly
:improve execution time?

I cannot imagine a shell compiler that did more than speed-up the
conditionals.  It might do some optimizations for `expr` or `basename`,
but these are special cases, and are seldom the major bottleneck in your
program.  To get real speedups usually requires an algorithmic shift.  You
have to pull what the various sub-processes are doing into your main
code.  Things that benefit most are repeated calls to things like head,
tail, bc, sed, awk, tr, sort, expand, etc.  Just saving the execs is a big
win, and you aren't going to get that with any shell compiler.  For that,
you need to translate your program into a richer programming language, 
like perl or C.

--tom
--
Tom Christiansen		tchrist@convex.com	convex!tchrist
		"So much mail, so little time."  

kwilson@John3_16.urbana.mcd.mot.com (Kent Wilson) (06/27/91)

In article <rodgers.677568004@maxwell.mmwb.ucsf.edu>,
rodgers@maxwell.mmwb.ucsf.edu (R. P. C. Rodgers, M.D.) writes:
|>Dear Netlanders,
|>
|>I keep hearing rumors of the existence of compilers for various UNIX
|>shells, but have never come across one (or even an add for one).
|>Does anyone know of any such beast, or (better yet) have direct
|>experience with one?  How good are they, and do they significantly
|>improve execution time?
|>

Some years back, Paul Ruel (sp?) and an associate of his at Concentric
Associates produced a shell compiler for the Bourne shell.  I do
not know if it can still be had.


Kent
===============================================================================

forrie@morwyn.UUCP (Forrie Aldrich) (06/27/91)

kwilson@John3_16.urbana.mcd.mot.com (Kent Wilson) writes:
|Some years back, Paul Ruel (sp?) and an associate of his at Concentric
|Associates produced a shell compiler for the Bourne shell.  I do
|not know if it can still be had.
[ ... ]

Could you find out where we could inquire of this?  I would be interested in
seeing some of these.  I know that the AT&T Toolche$t has something called
AWKCC (an AWK to C compiler), a friend of mine got a copy of it, but could
never get it to compile! (what a waste of $$$)

Forrest
-- 

--------------------=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--------------------
Forrest Aldrich, Jr.|   (a reliable path here someday)   |forrie@morwyn.UUCP
                    |           <email paths>            | 
CREATIVE CONNECTIONS|  uunet!virgin!unhtel!morwyn!forrie |Graphic Illustration
------------------\-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=/------------------
                   \___ PO Box 1541 - Dover, NH  03820 ___/