Re: Why are intepreters so slow today
Chris Winemiller (firstname.lastname@example.org)
Sat, 16 Apr 1994 05:06:03 GMT
In article <nagleCoACH4.email@example.com> firstname.lastname@example.org (John Nagle) writes:
> Lately, I've been looking at interpreters suitable for use as
>extension languages in a control application. I need something that
>can do computation reasonably fast, say no worse than 1/10 of the
>speed of compiled C code.
> My basic test is to run something equivalent to
> int i; double x = 0.0;
> for (i = 0; i < 1000000; i++) x = x + 1.0;
I tried this on my machine, and also tried the equivalent code in
Smalltalk/V for Win32:
x := 0.0.
1000000 timesRepeat: [x := x + 1.0]
The C version, running in a DOS window under Windows 3.1, executed in
about 4 seconds. The Smalltalk code ran in 14 seconds. That's a factor
of between 1/3 and 1/4 the speed of the C version---Certainly within
your criterion of 1/10.
Chris Winemiller Internet: email@example.com
Texas Instruments firstname.lastname@example.org
PO Box 655012 M/S 3635
Dallas, TX 75265 Voice: (214) 917-0332