Pardon my ignorance: what exactly is a "cache line"? Charles
-----Original Message----- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Jim Mulder Sent: Monday, June 02, 2014 8:13 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Is there a significant performance penalty for non-aligned operands? > Once upon a time IIRC there was a significant performance penalty for > non-aligned operands (loading a fullword from an address not evenly > divisible by four, etc.). Does that still exist for modern Z processors? > (Once upon a time it didn't work at all, but that's AFH, to use an acronym I > learned this week.) > > I have a string that looks like halfword, char, char, ..., halfword, char, > char, ... . It will be accessed millions of times per day in a system exit. > Would it be better to "pack" the halfwords immediately following the chars, > or halfword-align them with a slack byte where necessary? The access will be > read-only if that makes a difference. Response from hardware designer: It depends on the system. z10 and before, if an operand crossed a DW there was a penalty. On z196 and later, it is only if an operand crosses a cache line. Of course things could change again in the future. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN