On 3/13/2015 11:51 AM, J O Skip Robinson wrote:
SRST looks very cool. Thanks for the pointer! A simple loop searching for '.'
works but is not something to put on your resume. ;-) TRT is snazzier but
requires TLC for registers, especially R2. I imagine that TRT was invented back
in the day because so many routines needed to parse on delimiters. SRST looks
to be yet another improvement in the same quest.
TRT can search for multiple characters. SRST can search for only one.
For a known single delimiter search, SRST is much better than TRT because...
Poor TRT has become a casualty of "modern" hardware economics. It's a
complex instruction, with no analog on other platforms, that is no
longer used often enough to rate prime-location silicon chip
"real-estate." It was demoted to millicode emulation years ago (with
z9?) whereas SRST (used by Java, C/C++, and HLASM programmers "in the
know") is implemented 100% in silicon. TRT still has silicon assist, but
won't outperform other techniques until the string to be searched gets
reasonably long.
--
Edward E Jaffe
Phoenix Software International, Inc
831 Parkview Drive North
El Segundo, CA 90245
http://www.phoenixsoftware.com/
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN