many years ago, in a galaxy far, far away...

I did a benchmark to compare commands for clearing a 255 byte area to zeros.

Going from (IIRC) a 370/168 to a 3033 the order of all methods I checked
exactly reversed, which was, IIRC  (might have been 3033 to whatever we had
next)

LM, STM (not a loop, saving then loading 14 registers with zeros, storing
several times)
MVCL
MVC (from zeros)
... (I think there was one or two more which I forget)
overlapping MVC
XC

Yes, the new machine recognized that the XC arguments were the same and
just stored zeros apparently without fetching anything, maybe also
overlapping more with subsequent instructions, since due to a microcode bug
I know XC was greatly overlapped with later instructions..



On Wed, May 21, 2014 at 1:45 AM, Rob van der Heij <[email protected]> wrote:

> On 21 May 2014 07:34, Robin Vowels <[email protected]> wrote:
>
> > From: "Ed Jaffe" <[email protected]>
> > Sent: Wednesday, May 21, 2014 2:52 PM
> >
> >
> >
> >  On 5/20/2014 8:44 PM, Robin Vowels wrote:
> >>
> >>>
> >>>  I use MVCL a lot even for very small moves where the length is not
> >>>> known at assembly time. But I know my environment and its performance
> >>>> requirements, and often judge the relative elegance, generality, and
> >>>> programmer-readability of such an instruction to override what small
> >>>> performance gain there might be to multipathing and/or loops.
> >>>>
> >>>
> >>> Sounds like overkill.
> >>> MVC with EX would be simpler.
> >>>
> >>
> >> Not if you want padding.
> >>
> >
> > You didn't mention padding.  Only small moves.
> >
> > But even when padding is required, you can move the padding byte into the
> > destination area first.
> >
>
> At last resort one looks at the alternatives. The code I inherited has lots
> of EX MVC (into static areas near the code even) but the area is too
> crowded that I dare to free up the 4 right registers and change it.
>
> Recently for some new code doing memory allocations, I was very pleased
> with a MVCL. Rather elegant to have one instruction that copies the
> prepared header into the block and wipes the payload with padding.Reading
> the Principles of Operation last night, I noticed it states that some
> models may be very good in doing MVCL. But probably also in MVC overlaps by
> one byte, maybe even EX of those...
>
> Rob
>



--
--Carey

Reply via email to