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



"James Arthur" <dagmargoodboat@xxxxxxxxx> wrote in message
news:bc97e0c5-97f6-4327-b473-310fae972c40@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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.

Tim

--
Deep Friar: a very philosophical monk.
Website: http://webpages.charter.net/dawill/tmoranwms


.



Relevant Pages

  • Re: Fortran vs. C++ : Which is best to choose now i
    ... > typically ran up to 7 times slower than the original. ... In days past when machines were smaller and slower, ... Not that one shouldn't take advantage of faster machines with ...
    (comp.lang.fortran)
  • Re: Fortran vs. C++ : Which is best to choose now i
    ... > typically ran up to 7 times slower than the original. ... In days past when machines were smaller and slower, ... Not that one shouldn't take advantage of faster machines with ...
    (comp.lang.fortran)
  • Re: Row-wise vs. column-wise image processing
    ... grayscale image, and computes a pixel's new value as a function of its ... times slower than the horizontal, although the code is _exactly_ the ... do to change it with this processing style. ... Cache misses can give a huge loss of cycles. ...
    (comp.lang.c)
  • Re: 6.0 random freezes
    ... SMP changes from 5.4 to 6.0.) ... I remember unseting debug.mpsafenet before 5.4 due to some ipfw limitations, but didn't know about the other two. ... Both machines are not much loaded, so I could afford slowing them down a bit for a while (I hope it won't be several times slower). ...
    (freebsd-stable)
  • Re: Jonesforth and Hayes CORE tests
    ... Here, the data may end up in the same cache line the defining word, ... such an issue is the reason why BigForth is about 30 ... times slower than iForth on cd16sim, and probably also why BigForth is ... the small benchmarks that are often used to evaluate performance. ...
    (comp.lang.forth)