Re: Why are intepreters so slow today

Colin Plumb (colin@nyx10.cs.du.edu)
Tue, 19 Apr 94 07:20:04 GMT

In article <nagleCoD5o6.CD6@netcom.com>, John Nagle <nagle@netcom.com> wrote:
>knight@mrco.carleton.ca (Alan Knight) writes:
>>For one thing, this is a fairly pathological benchmark. I can't speak
>>for Python, but none of the current Smalltalk implementations do very
>>much optimization of floating point arithmetics. Smalltalk/V Mac, in
>>particular, has abysmal floating point (you don't say which dialect
>>you tried).
>
> Arithmetic is a pathological benchmark. Right.

For an interpreted language, it certainly is. Each operation in the
test is one machine instruction (F.P. add, decrement, and
conditional branch). It's hard to intrepret anything in less than
30 instructions.

But do string-schlepping, associative arrays, run-time binding,
and all kinds of other things that have more computationally
intensive core operations, and interpreters start to look
much better.

Write a shell script, a Perl script and a C program to pull selected
lines out of /usr/adm/SYSLOG. Which took longer to run? Which took
longer to *write*? Quite simply, Awk and C are useful for mostly-disjoint
sorts of problems.

-- 
	-Colin