> -----Original Message-----
> From: IBM Mainframe Assembler List
> [mailto:[email protected]] On Behalf Of john gilmore
> Sent: Thursday, October 07, 2010 10:52 PM
> To: [email protected]
> Subject: Re: 16 bytes the same
<Snipped>
> Apart from its obvious usefulness in processing right-to-left
> text like that of Arabic, Farsi, and Hebrew, the TRTR
> instruction is valuable for locating the rightmost non-blank
> character in left-to-right text.

Useful, yes.  CPU efficient, not.  During an application-level MIPS reduction 
project in the recent past I had the opportunity to measure (on a z10) finding 
the rightmost non-blank using TRTR against loops of CLC's of various sizes and 
against a CLI loop, and IIRC the CLC's almost always beat the TRTR for average 
CPU consumed.  I think that the CLI loop was more expensive than the TRTR, 
especially for longer spans of blanks (>1000), but I may be mis-remembering 
that measurement.  I did not measure TRTR against alternate algorithms using 
4-byte or 8-byte register-to-storage compares.

Unfortunately I don't have the numbers any more so I can't offer you any 
positive proof.  If I find any round tuits I will try to replicate those tests, 
but don't hold your breath waiting for me.

It will be quite interesting to see if the z196 has changed that comparison in 
any way.

Peter
--
This message and any attachments are intended only for the use of the addressee 
and
may contain information that is privileged and confidential. If the reader of 
the
message is not the intended recipient or an authorized representative of the
intended recipient, you are hereby notified that any dissemination of this
communication is strictly prohibited. If you have received this communication in
error, please notify us immediately by e-mail and delete the message and any
attachments from your system.

Reply via email to