MVCL also has the advantage of automatically maintaining the output
buffer position (in the target address register), very useful when
building up a string from multiple parts.  An example is a
comma-separated-values string, and for that case, it's handy to set the
pad character to the delimiter, and the target length to 1 more than the
data length.

sas

On 5/23/2012 21:30, Tony Harminc wrote:
You know, for the vast majority of these cases, I just use MVCL, or
sometimes a simple macro that encapsulates one with a little help on
the register setup and padding.

Yes, of course MVCL takes a while to get itself cranked up, and where
that crossover lies with respect to a loop, unrolled or not, of MVCs,
varies by machine type. But in the crunch it is so rare that I am
writing time critical code that the power, simplicity, and elegance of
MVCL trumps all. It is even rarer that I need to worry about moves
where it is unknown at compile time that the length may exceed 16MB.

When building a print or WTO line from data components, MVCL instead
of MVC even for a few short pieces is very unlikely to be a big
contributor to a product's overall CPU consumption.

Tony H.

Reply via email to