Xref: utzoo comp.unix.shell:2489 comp.unix.wizards:26067 Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!cs.utexas.edu!convex!usenet From: tchrist@convex.COM (Tom Christiansen) Newsgroups: comp.unix.shell,comp.unix.wizards Subject: Re: sh and/or csh compilers? Keywords: shell compilers Message-ID: <1991Jun22.060050.11121@convex.com> Date: 22 Jun 91 06:00:50 GMT References: Sender: usenet@convex.com (news access account) Reply-To: tchrist@convex.COM (Tom Christiansen) Organization: CONVEX Software Development, Richardson, TX Lines: 22 Nntp-Posting-Host: pixel.convex.com 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."