Re: Branch (was: Performance question - adding)

2014-02-19 Thread John McKown
On Tue, Feb 18, 2014 at 5:20 PM, Shmuel Metz (Seymour J.) shmuel+ibm-m...@patriot.net wrote: In of1dbe6dec.23eaa84d-on85257c83.0046f9a1-85257c83.0047a...@us.ibm.com, on 02/18/2014 at 08:02 AM, Peter Relson rel...@us.ibm.com said: So it's probably less about optimizing existing code

Rewriting Assembler to COBOL was Re: Branch (was: Performance question - adding)

2014-02-19 Thread Clark Morris
On 19 Feb 2014 03:48:24 -0800, in bit.listserv.ibm-main you wrote: On Tue, Feb 18, 2014 at 5:20 PM, Shmuel Metz (Seymour J.) shmuel+ibm-m...@patriot.net wrote: In of1dbe6dec.23eaa84d-on85257c83.0046f9a1-85257c83.0047a...@us.ibm.com, on 02/18/2014 at 08:02 AM, Peter Relson

Re: Branch (was: Performance question - adding)

2014-02-18 Thread Peter Relson
I have to ask: Why they big concern over a few instructions? Optimisation of a few is not worth the effort these days. In my opinion, it's not concern, it's pride. Surely all of us programmers like our code to be the best it can be, within reason. So it's probably less about optimizing

Re: Branch (was: Performance question - adding)

2014-02-18 Thread Ted MacNEIL
consistently within a second for a 4-hour perio‎d to impact at all. - -teD -   Original Message   From: Peter Relson Sent: Tuesday, February 18, 2014 08:02 To: IBM-MAIN@LISTSERV.UA.EDU Reply To: IBM Mainframe Discussion List Subject: Re: Branch (was: Performance question - adding) I have to ask: Why they big

Re: Branch (was: Performance question - adding)

2014-02-18 Thread John Gilmore
Ted MacNeil wrote | Pride? Maybe. making it clear rhat he doesn't get it. There is a very small book, A mathematician's apology, by G. H. Hardy that I may well have mentioned here before. In it Hardy identifies three characteristics that all those who do good, sat all memorable intellectual

COBOL compiler code generation wasRe: Branch (was: Performance question - adding)

2014-02-18 Thread Clark Morris
On 17 Feb 2014 10:13:44 -0800, in bit.listserv.ibm-main you wrote: On Mon, Feb 17, 2014 at 12:06 PM, Elardus Engelbrecht elardus.engelbre...@sita.co.za wrote: Ted MacNEIL wrote: I have to ask: Why they big concern over a few instructions? Good question. This is why I asked that loop

Re: Branch (was: Performance question - adding)

2014-02-18 Thread John McKown
On Tue, Feb 18, 2014 at 10:12 AM, John Gilmore jwgli...@gmail.com wrote: Ted MacNeil wrote | Pride? Maybe. making it clear rhat he doesn't get it. There is a very small book, A mathematician's apology, by G. H. Hardy that I may well have mentioned here before. In it Hardy identifies

Re: COBOL compiler code generation wasRe: Branch (was: Performance question - adding)

2014-02-18 Thread Ed Jaffe
On 2/18/2014 8:16 AM, Clark Morris wrote: If the code generated by the COBOL compiler at your installation stinks, review the compile options. IIRC, the COBOL V5 compiler leap frogs over C/C++ and PL/I to now use the same, ultra-smart, optimizing compiler back-end used by Java. It should be

Re: Branch (was: Performance question - adding)

2014-02-18 Thread zMan
Indeed. My favorite (which is, I suspect, where a lot of Big Numbers come from) is folks who have clearly extrapolated from a peak rate, like We peaked at 20,000 transactions per minute over Black Friday, so we need to be able to support 10 billion per year. But if you dig a bit more, you find out

Re: Branch (was: Performance question - adding)

2014-02-18 Thread Shmuel Metz (Seymour J.)
In of1dbe6dec.23eaa84d-on85257c83.0046f9a1-85257c83.0047a...@us.ibm.com, on 02/18/2014 at 08:02 AM, Peter Relson rel...@us.ibm.com said: So it's probably less about optimizing existing code (unless it's in a loop) than about understanding what is best for your new code, when the development

Branch (was: Performance question - adding)

2014-02-17 Thread Paul Gilmartin
On Mon, 17 Feb 2014 07:49:18 -0500, Peter Relson wrote: If the branch technique is faster, and depending on how high a percentage most of the time (as in most of the time CURRENT will be zero) is, then the branch technique given as the alternative to no-branch is likely not optimal. Even with

Re: Branch (was: Performance question - adding)

2014-02-17 Thread John McKown
Combining the thoughts engendered from about three replies, I wonder if avoiding a branch as follows (on a processor which supports the instructions) would perform better than branching. LT R0,CURRENT #LOAD CURRENT AND SET CC SPM R1 #SAVE CC FROM LT A R0,SUM #ADD SUM TO IT IPM R1 #RESTORE CC

Re: Branch (was: Performance question - adding)

2014-02-17 Thread David Crayford
On 17/02/2014 10:25 PM, Paul Gilmartin wrote: Then you get to factor in how much readability is worth to you. Macros are your friend. But does providing readability at the programming interface level make such a macro unpleasantly verbose internally? Unless your desperately need highly

Re: Branch (was: Performance question - adding)

2014-02-17 Thread Charles Mills
: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of John McKown Sent: Monday, February 17, 2014 6:37 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Branch (was: Performance question - adding) Combining the thoughts engendered from about three replies, I wonder if avoiding

Re: Branch (was: Performance question - adding)

2014-02-17 Thread Paul Gilmartin
On Mon, 17 Feb 2014 08:02:40 -0800, Charles Mills wrote: I got to thinking it would be nice to have a store different instruction (or make store behave this way automatically under the covers) which would invalidate the cache only if what it were storing were different from what was in memory

Re: Branch (was: Performance question - adding)

2014-02-17 Thread John McKown
[mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of John McKown Sent: Monday, February 17, 2014 6:37 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Branch (was: Performance question - adding) Combining the thoughts engendered from about three replies, I wonder if avoiding a branch as follows (on a processor

Re: Branch (was: Performance question - adding)

2014-02-17 Thread Ted MacNEIL
Discussion List Subject: Re: Branch (was: Performance question - adding) Another possibility which occurs to me, on newer hardware, is to try out the BPRP instruction. This also addresses Gil's thought about not fetching the cache line containing SUM unless it is necessary. Remember this assumes

Re: Branch (was: Performance question - adding)

2014-02-17 Thread Paul Gilmartin
On 2014-02-17, at 10:36, Ted MacNEIL wrote: I have to ask: Why they big concern over a few instructions? Optimisation of a few is not worth the effort these days. Hmmm... No single instruction is worth optimizing. No single instruction among a million is

Re: Branch (was: Performance question - adding)

2014-02-17 Thread Elardus Engelbrecht
Ted MacNEIL wrote: I have to ask: Why they big concern over a few instructions? Good question. This is why I asked that loop question earlier today. But I'm following this fun thread about the cache, fetch/modify by different CPs and execution prediction. Just curious of course. Optimisation

Re: Branch (was: Performance question - adding)

2014-02-17 Thread John McKown
On Mon, Feb 17, 2014 at 12:03 PM, Paul Gilmartin paulgboul...@aim.comwrote: On 2014-02-17, at 10:36, Ted MacNEIL wrote: I have to ask: Why they big concern over a few instructions? Optimisation of a few is not worth the effort these days. Hmmm... No

Re: Branch (was: Performance question - adding)

2014-02-17 Thread John McKown
On Mon, Feb 17, 2014 at 12:06 PM, Elardus Engelbrecht elardus.engelbre...@sita.co.za wrote: Ted MacNEIL wrote: I have to ask: Why they big concern over a few instructions? Good question. This is why I asked that loop question earlier today. But I'm following this fun thread about the

Re: Branch (was: Performance question - adding)

2014-02-17 Thread Charles Mills
Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of John McKown Sent: Monday, February 17, 2014 10:09 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Branch (was: Performance question - adding) On Mon, Feb 17, 2014 at 12:03 PM, Paul Gilmartin paulgboul...@aim.comwrote: On 2014-02-17, at 10

Re: Branch (was: Performance question - adding)

2014-02-17 Thread Ted MacNEIL
On a 600 MIPS single engine (z/990 class) 1,000,000 instructions is 0.17% of a CP. These days? - -teD -   Original Message   From: John McKown Sent: Monday, February 17, 2014 13:15 To: IBM-MAIN@LISTSERV.UA.EDU Reply To: IBM Mainframe Discussion List Subject: Re: Branch (was: Performance question

Re: Branch (was: Performance question - adding)

2014-02-17 Thread John Gilmore
What does the statement | 1,000,000 instructions is 0.17% of a CP mean? What are the dimensions of % John Gilmore, Ashland, MA 01721 - USA -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to

Re: Branch (was: Performance question - adding)

2014-02-17 Thread Tom Marchant
On Mon, 17 Feb 2014 14:04:56 -0500, John Gilmore wrote: What does the statement | 1,000,000 instructions is 0.17% of a CP mean? What are the dimensions of % I don't know, but it would appear to be a gross oversimplification. Ted should know as well as anyone here that MIPS is meaningless,

Re: Branch (was: Performance question - adding)

2014-02-17 Thread Charles Mills
engine (z/990 class) 1,000,000 instructions is 0.17% of a CP. These days? - -teD -   Original Message   From: John McKown Sent: Monday, February 17, 2014 13:15 To: IBM-MAIN@LISTSERV.UA.EDU Reply To: IBM Mainframe Discussion List Subject: Re: Branch (was: Performance question - adding) On Mon, Feb 17

Re: Branch (was: Performance question - adding)

2014-02-17 Thread Ed Finnell
Benchmarks, features, tuning knobs, performance bonds all factor in to the mix. The ones that scare me are the 'theoretically we can run some gazillion transactions on a mainframe'! In a message dated 2/17/2014 2:18:47 P.M. Central Standard Time, charl...@mcn.org writes: I develop

Re: Branch (was: Performance question - adding)

2014-02-17 Thread John McKown
On Mon, Feb 17, 2014 at 11:36 AM, Ted MacNEIL eamacn...@yahoo.ca wrote: I have to ask: Why they big concern over a few instructions? Optimisation of a few is not worth the effort these days. - -teD - OK, this then causes me to wonder why IBM has bothered

Re: Branch (was: Performance question - adding)

2014-02-17 Thread Tony Harminc
On 17 February 2014 09:37, John McKown john.archie.mck...@gmail.com wrote: LT R0,CURRENT #LOAD CURRENT AND SET CC SPM R1 #SAVE CC FROM LT A R0,SUM #ADD SUM TO IT IPM R1 #RESTORE CC FROM LT STOC R0,SUM,NZ #STORE SUM ONLY IF CC OF LT WAS NZ Basically this loads CURRENT into R0, setting the

Re: Branch (was: Performance question - adding)

2014-02-17 Thread Ed Jaffe
On 2014-02-17, at 10:36, Ted MacNEIL wrote: I have to ask: Why they big concern over a few instructions? Optimisation of a few is not worth the effort these days. LOL. If Binyamin's question wasn't worth asking, then IBM would never have recently introduced