Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: The "why" of the newer instructions?

7 views
Skip to first unread message

john gilmore

unread,
Nov 10, 2009, 7:08:09 AM11/10/09
to
Responding to Benyamin Dissen's contention that "millicode should be way faster than open code", Edward Jaffe wrote

|
| Why? Millicode uses the same instruction pipeline, the
| same execution unit, etc.
|

This is certainly and tritely true; but, as EJ knows very well, millicode has available to it and uses other facilities that are not available to open code.

Millicode is often, in my experience, significantly faster.

I have, for example, compared the execution times of two versions of von Neumann's classical division-method hashing scheme, the first written out in extenso, the second using the CKSM (CHECKSUM) instruction; and the second was 34% faster.

I doubt that differences of this size are routinely achievable; but meaningful performance improvements making serendipitous use of such millicode sequences as IBM makes available to us are certainly possible.

John Gilmore Ashland, MA 01721-1817 USA


_________________________________________________________________
Hotmail: Trusted email with Microsoft's powerful SPAM protection.
http://clk.atdmt.com/GBL/go/177141664/direct/01/
http://clk.atdmt.com/GBL/go/177141664/direct/01/

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

David Crayford

unread,
Nov 10, 2009, 7:33:51 AM11/10/09
to IBM Mainframe Discussion List
john gilmore wrote:
> Responding to Benyamin Dissen's contention that "millicode should be way faster than open code", Edward Jaffe wrote
>
> |
> | Why? Millicode uses the same instruction pipeline, the
> | same execution unit, etc.
> |
>
> This is certainly and tritely true; but, as EJ knows very well, millicode has available to it and uses other facilities that are not available to open code.
>
> Millicode is often, in my experience, significantly faster.
>
> I have, for example, compared the execution times of two versions of von Neumann's classical division-method hashing scheme, the first written out in extenso, the second using the CKSM (CHECKSUM) instruction; and the second was 34% faster.
>
> I doubt that differences of this size are routinely achievable; but meaningful performance improvements making serendipitous use of such millicode sequences as IBM makes available to us are certainly possible.
>

I have found that the CKSM instruction is unreliable as a general
purpose hashing algorithm. It's an additive hash and does not mix bits
to force avalanching. It has more collisions than you can shake a stick at.

CKSM may seem faster because it chews the bytes faster but if you were
to write a test program that counts the length of the synonym chains
(markov chains) you will soon notice that the distributions are
pathological. A simple test is to write a simple hash table program that
outputs the chain lengths and use MS Excel to draw a histogram. CKSM sucks!

0 new messages