On Jan 16, 2012, at 07:53, robin wrote:

> From: "Dan Skomsky, PSTI" <[email protected]>
> Sent: Monday, 16 January 2012 11:49 PM
>
>> One Assembler trick I have seen in speeding up scanning loops was to use a
>> CLI instruction to check the first byte of a string and then only doing the
>> CLC/CLCL if the CLI matches.  This trick even works if doing a binary
>> search.
>
On the average (FSVO), how does this compare Boyer-Moore?

I've seen suggested TRT for the first character, then CLC for
the rest.  Works much better for strings beginning with "Z"
than for strings beginning with " ".

> Marginal savings, I think, compared to EX/CLC or CLCL,
> for the reason that both CLC and CLCL give up after examining the
> first character, should they be unequal.
>
> Might be more fruitful to compare length of the key with that of an element 
> first,
> and then carrrying out the compare should those lengths be equal.
>
Gives you "=", but not "<" or ">", so precludes binary search.

What was the statement of the problem, anyway?

CDC 3600/3800 had a "Modify following instruction" instruction
that met much of the requirement for EX.  And pipelining was of
little import in that era.

-- gil

Reply via email to