[om-list] Re: shell

Mark Butler butlerm at middle.net
Fri Oct 5 11:25:38 EDT 2001


Tom and other Packers wrote:

>     Using Cygwin sounds too complicated, and I'm guessing it will slow down
> my program on Windows.  I'm already afraid of it being too slow, so ... ?

Cygwin isn't likely to make any significant performance difference. It is effectively just a greatly enhanced version of the standard library used by every C program.
 
>     Do any of the three ways of compiling my script make the end product
> into one program, one executable, as opposed to making the script into a
> program which still calls other programs (the utilities)?  Is there no
> (easy) way to combine the source code of the utilities and the "source code"
> of the shell and scripts, to make one executable?

You can compile everything into a single multithreaded program if you want, it is just harder to debug and make changes that way.  Do you really imagine users doing this?  
 
>     Can you give me some idea of how much speed-difference there might be
> among the three things I'm talking about: one executable, a compiled
> shell-script running utilities, an interpreted shell-script running
> utilities?

That depends entirely on what the shell script does - surely you aren't thinking of having it do low level sample-by-sample numerical processing. If all it does it high level utility interconnection, interpreted versus compiled performance difference is likely to be inconsequential.  Multi-process pipes vs. in-process streaming is not likely to make much difference either if the utilities are doing anything numerically intensive.

>     I guess if writing a compiler is too hard, we could manually write a C
> program that did the same thing as the compiled shell script would do,
> right?

Yes.




More information about the om-list mailing list