A common mistake in choosing what/whether to optimize is to consider the
speedup obtainable in a portion of the task under consideration, without
adequate analysis of the contribution of that portion to the whole task.
You need to ask: What portion of the total latency in sending a request,
processing it, and receiving a reply is spent executing a Perl script, and
how much faster would it be if the script were a binary executable? For
some tasks, the execution time will be significant, and optimizing it will
be a sensible step. For most tasks it wouldn't matter even if the C code
ran 1000 times faster than the Perl code. There is no substitute for actual
measurements of the behavior of a particular application. The telescope
builder's rule is also applicable here: It's faster to build a 3" lens and
then a 5" lens, than to build a 5" lens.
Software Engineering Research Center
Department of Computer Sciences
1398 Computer Science Building
West Lafayette, IN 47907-1398