shell compiler?

gwyn at brl-smoke.UUCP gwyn at brl-smoke.UUCP
Mon Apr 21 12:19:35 AEST 1986


In article <796 at brahma.cs.hw.AC.UK> chris at cs.hw.AC.UK (Chris Miller) writes:
>The conclusions seem clear:
>-	The time spent in shell interpretation is negligible compared to
>	the time taken to exec other programs.
>-	Searching directories to find commands is cheap compared to
>	fork/exec, but expensive compared to interpreting shell control
>	constructs.
>-	For very small scripts, the startup time of the shell compared
>	to a C program is a significant overhead.

We have both an Adventure shell and a C shell implemented as Bourne
(SVR2) shell scripts, with acceptable performance.  The shell is
fairly well designed for its application domain (running processes
on UNIX), and having just the one program source rather than both
source and compiled version is a big win.  The shell actually
parses the script into an internal form, then acts as an interpreter;
I've written other application-specific utilities that work on the
same general principle and find that they can run pretty darn fast.



More information about the Comp.unix.wizards mailing list