<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Sun, 17 Jul 1994 02:41:41 +0100
From   : jfid@... (James Fidell)
Subject: Modularity schmodularity...

Never mind the quality, feel the width :-)

One of my design goals when I started xbeeb was to keep the code as
modular as possible.  In my recent quest for as much performance as
I can get, I've binned this approach, because it just doesn't look
like it will work (ah well, once a speed freak, always a speed
freak, I suppose.  Now where did I leave my knee-sliders ?)

The main area where I've cut modularity for the greatest gain in speed
is all the clock updates for the VIA timers, generation of the Video
sync. interrupt etc.  All work to do with updating clocks etc. is now
done in one function.

I've combined this with restricting the updates to no more than once
every 100 cycles, which has also compromised my goal of being able to
cope with Kevin Edwards' copy protection, but I think it was probably
necessary for the time being.  This feature is conditionally compiled
anyway, so I could still run perfectly accurate clocks if I needed to.

The result of selling my granny to the white slavers is a performance
increase of about 30% -- enough to just be touching the near side of
600,000 emulated instructions per second for the first 5 million
instructions executed after power-up.

I don't know why I didn't think of this before, but it's just struck me
that a good way to get comparitive timings for the speed of the Beeb and
an emulator is to run time the following line of BASIC :

    TIME = 0 : REPEAT UNTIL TIME > 5999 : PRINT TIME

On my reference machine of the moment (a 486-66 SCO box here in the
office) this completes in about 62 seconds.

What a shame to go and waste it all by adding more functionality :-)

James.

-- 
 "Yield to temptation --             |
  it may not pass your way again"    |     jfid@...        
                                     |
        - Lazarus Long               |              James Fidell
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>