

Quotations on simplicity in software design - opusdie
http://www.jbox.dk/quotations.htm

======
dalke
I saw the first line, "Remember that there is no code faster than no code."
and realized it needs at least one qualifier; just because you see no code
doesn't mean it isn't there.

    
    
      % echo -n "" > nothing.sh
      % cat > nothing.c
      int main() {
        return 0;
      }
      ^D
      % cc nothing.c -o nothing
      % chmod +x ./nothing.sh
      % ls -l nothing.sh nothing
      -rwxr-xr-x  1 dalke  admin  8648 Dec 24 16:55 nothing
      -rwxr-xr-x  1 dalke  admin     0 Dec 24 16:59 nothing.sh
    
      % time ./nothing.sh
      0.007u 0.006s 0:00.01 0.0%	0+0k 0+0io 0pf+0w
      % time ./nothing.sh
      0.006u 0.005s 0:00.01 0.0%	0+0k 0+0io 0pf+0w
      % time ./nothing.sh
      0.006u 0.005s 0:00.01 0.0%	0+0k 0+0io 0pf+0w
    
      % time ./nothing
      0.000u 0.000s 0:00.00 0.0%	0+0k 0+0io 0pf+0w
      % time ./nothing
      0.000u 0.000s 0:00.00 0.0%	0+0k 0+0io 0pf+0w
      % time ./nothing
      0.000u 0.000s 0:00.00 0.0%	0+0k 0+0io 0pf+0w
    

An empty file (which is treated as a shell script) takes longer to run than
the 8K file.

