| Next | Making Programs Faster | 19 | 
To speed up webgrep, we would need to address the network latency time
It is unlikely that altering the search itself will produce much of an effect
The benchmarks bear this out:
     % ./webgrep perl http://www.perl.com/
     real    0m3.456s
     user    0m0.720s
     sys     0m0.070s
CPU time accounted for only about 23% in this simple case
     % ./webgrep perl http://www.perl.com/ http://www.perl.com/ \
             http://www.perl.com/ http://www.perl.com/ \ 
             http://www.perl.com/ http://www.perl.com/
     real    0m15.599s
     user    0m0.840s
     sys     0m0.110s
6% in this case
Trying to speed up an I/O bound program by reducing the amount of computation won't work
Alternative:
Parallelize I/O (asynchronous I/O; move it to subprocesses, etc.)
| Next |  | Copyright © 2003 M. J. Dominus |