The OP asks  "1) why does REXX use so much CPU"?, but a better question is
"2) why is my REXX program use so much CPU"?   An even better question is
"3) why does this particular thing that I'm doing in my program take so
much time, and how to I fix it?"

IMO, a programmer shouldn't ask the first question.   A good programmer
knows how to get from the second question to the third question, and then
answer it by choosing better algorithms or in some cases re-coding bits in
C or Assembler.

A great way to get from question (2) to (3) is to run a profiler to see
where you are spending all of your time (wall clock or cpu).  Then, fix the
hot spots by choosing a better algorithm or in some cases re-coding them in
C or Assembly.

Is there a profiler for either interpreted or compiled REXX on z/OS?  I've
coded in REXX, but I'm far from an expert so I don't know.   As a crude
alternative, add code to the program to capture timing of code blocks,
starting top down and refining until you zero in on the problem areas.   In
most programs, 95% of the time is spent in 5% of the code.

Kirk Wolf
Dovetailed Technologies
http://dovetail.com


PS> IBM wouldn't say the REXX uses too much CPU - rather, "REXX is able to
exploit the processing capabilities of the z Architecture"  :-)

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to