Re: A chip too far? Where is your solution Mr Larkin?






Tim Williams wrote:

James Arthur wrote...

Years ago I gasped at the inefficient code output by Microsoft
QuickBasic, needlessly stacking a load of registers and constants,
then calling functions to do simple math (very slow operations on
the 8088). Repeat. I re-wrote some tight-loop stuff in assembly.
An all-integer FFT, I think.

Then I traced the system calls--OMG, a new height in useless
cycle-burning. Maybe 1% efficient.

You think that's insane? You haven't even analyzed it on modern hardware.
The FAR CALLs wreak havoc on cache, as far as I can tell. QBasic programs
typically run at about bus speed. Relative to core clock frequency, QBasic
is approximately 20 times slower than equivalent assembly code on the 8086,
but more like 4000 times slower than assembly, without far calls, that runs
inside the cache, if not inside just the instruction pipeline itself. So
relatively speaking, QB runs 20 times *slower* on modern hardware.

Comparing QBasic to assembly programs on both machines, the difference in
speed, even the palpable relative speediness of QBasic on the XT machine, is
amazing.

I noticed that James is writing about QuickBasic and Tim replied
with comments about QBasic. Are you aware that those are not the
same thing?


--
Guy Macon
<http://www.GuyMacon.com/>

.



Relevant Pages