Optimization Question



Pete wrote:

Is there a reason to not replace this code with

cld ; only need to specify once (outside loops)
rep movsw

Surely this would be faster?

There was originally a reason. But with the rewrite
you are probably correct that it could be done that way.
There is a CLD there, so it was tried sometime back in
the past, and I was swapping registers badly at that time.

All of those seems very slow (especially the 200LX taking in the
order of 300ms per iteration). How are you calculating these
numbers?

Copy work area 1 to work area 2 offset one pixel right.
XOR work area 1 to work 2 offset one pixel up, again one
pixel left, again one pixel down. Copy work area 2 to the
screen. Swap work area pointers and repeat. Older program
on the 200LX S.U.P.E.R. site as a state machine.

This someone doesn't ;-) Assuming that DI is pointing to aligned
data (the CGA screen) I would have thought that calling AlignChk
before the user data that SI points to would be more beneficial
than before the code loops...

Thanks, that seems to be the problem. The data area was
misaligned due to pilot error in adding some variables that
edited out the alignment code... Sheesh.

odd
+6.16611296E+002 Iterations per second.
+2.87060840E+000 Iterations per second.

even
+6.55252918E+002 Iterations per second.
+3.51239669E+000 Iterations per second.

odd code, even data
+6.53900709E+002 Iterations per second.
+3.37871911E+000 Iterations per second.

That makes more sense. Now I don't have to care about
code alignment.

Thanks,

Steve N.

.



Relevant Pages

  • Re: Antialiasing the Mandelbrot Set
    ... Divide the pixel to render in 3x3 sub-pixels. ... of iterations and write that one as the pixel on the screen. ... > By playing with gradients I can get interesting images but I end up ... > images with absolutly no artifacts and I would like to produce high ...
    (sci.fractals)
  • Re: Antialiasing the Mandelbrot Set
    ... Divide the pixel to render in 3x3 sub-pixels. ... of iterations and write that one as the pixel on the screen. ... create the images.) ...
    (sci.fractals)
  • Re: Remove speckles in bilevel (bw) image
    ... Is the group 'a' the pixels in the 'X shaped' subarea ... here is a version with a center weight ... value as the center and if so, one more pixel in this direction is taken ... http://freenet-homepage.de/JDierks/tmp/bw_04_least3.png And 2 iterations of it: ...
    (sci.image.processing)