Re: Why are intepreters so slow today

Stefan Monnier (monnier@di.epfl.ch)
18 Apr 1994 19:58:43 +0200

In article <766508782snz@genesis.demon.co.uk>,
Lawrence Kirby <fred@genesis.demon.co.uk> wrote:
> Under C this took 10 seconds, interpreted BASIC took 16 seconds.

I could probably say the same kind of things for GfA Basic on atari
ST, where some programs ran faster in interpreted basic than in C. The
reason is simple: most of the time is spent on FP ops because they are
simulated and FP-ops simulation takes a lot of time (bit-twiddling,
..). And the GfA Basic used a special FP encoding (48bits), whereas C
compilers always stick to IEEE.

It's like comparing a sed-script with a C-written equivalent program:
the interpretive overhead is likely to be low because of the high
level of the basic operations.

Stefan

-- 

----------------------------------------------------- -- On the average, people seem to be acting normal -- -----------------------------------------------------