> -----Original Message-----
> From: IBM Mainframe Discussion List 
> [mailto:[email protected]] On Behalf Of Sam Siegel
> Sent: Tuesday, February 16, 2010 1:44 PM
> To: [email protected]
> Subject: Re: Fastest branch instruction
> 
<snip>
> 
> You may want to look at some of the new compare instructions 
> such as compare
> logical immediate and branch relative.  The branch is 
> generated inside the
> instructions when the comparison fails.

Those a z10 only. We are stuck for who knows how long on a __purchased__ z9BC.

> 
> You may also want to try an experiment with compare halfword 
> immediate. (I
> know it is a signed compare but since your are testing for 
> equal/not equal
> you should be ok.)  You can compare two bytes at a time.  
> Along those lines,
> depending on occurrences and lengths of blank character runs 
> you may want to
> pre-load a 32 or 64 bit register w/spaces and then fetch 4 or 
> 8 bytes at a
> time and do a compare logical register.  Be sure to only 
> start fetching once
> the source is on a word or double word boundary ... otherwise 
> register load
> performance will suffer.  Basically you will need to use a 
> CLI loop until
> you get to the correct boundary.

Hum, an interesting thought, for sure!

> 
> Compile a C or Metal-C program with memcmp under high 
> optimization and the
> correct arch level.  Take a close look at the generated code. 
>  Try it with a
> fixed length target (char a[ 10 ]) and a variable length 
> object (char *a).
>  The code is very interesting.

No C compiler here. No money, either.

> 
> Cheers
> Sam


--
John McKown 
Systems Engineer IV
IT

Administrative Services Group

HealthMarkets(r)

9151 Boulevard 26 * N. Richland Hills * TX 76010
(817) 255-3225 phone * (817)-961-6183 cell
[email protected] * www.HealthMarkets.com

Confidentiality Notice: This e-mail message may contain confidential or 
proprietary information. If you are not the intended recipient, please contact 
the sender by reply e-mail and destroy all copies of the original message. 
HealthMarkets(r) is the brand name for products underwritten and issued by the 
insurance subsidiaries of HealthMarkets, Inc. -The Chesapeake Life Insurance 
Company(r), Mid-West National Life Insurance Company of TennesseeSM and The 
MEGA Life and Health Insurance Company.SM

 

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to