On 15/01/2019 2:55 am, Ed Jaffe wrote:
In my experienced the two optimizations that make the most difference
are function inlining and loop unrolling. I've taken to defining
functions in header files to take advantage of both (we don't use IPA).
Yes. both are important. In HLASM one would use a macro to inline a
function. Manual loop unrolling is something we do only in the
performance path.
We do just that. We use macros for subroutines and stuff like moving
data using unrolled MVC instructions. We copied the code from the
optimizer and it's works great!
I've noticed (depending on compiler options) the C optimizer is
starting to use vector instructions. They can be a bit hairy even for
experienced assembler programmers. Best to leave that to a compiler IMO.
Haha! We were part of the z13s ESP and we started using vector
instructions in our HLASM programs even before the machine was GA! We
use them for all kinds of primitives including string FIND, bitmap
manipulation, and other equally-simple, but important, stuff. Those
"vectorized" routines perform literally orders of magnitude faster
than their non-vector counterparts! Using them instead of SRST, we
were able reduce the total CPU used by an (E)JES FIND across a
multi-million line SPOOLed report by something in the neighborhood of
23%! (And if you can imagine all of the other work being done -- such
as calling numerous routines, stack manipulation, reading and
deblocking of SPOOL records, etc. -- 23% is a HUGE amount!!!)
WOW! 23% is awesome!! That is one hell of a saving and your customers
will love you for it.
Sadly, I've tried to convince the assembler programmers on
ASSEMBLER-LIST that vector instructions are useful for such purposes,
but have been met with a surprising level of skepticism (despite my
real-world experience and glowing endorsement) -- primarily due to
flawed interpretation of what they've read in PoOp rather than just
trying it out and seeing for themselves. Oh well... LOL
Well they are daunting instructions! Not as hairy as transaction memory
but still daunting. I suppose once you learn them it's happy days and
you can wrap them up in routines.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN