From: bob@nix.mdn.com@mdn.com
Newsgroups: comp.lang.rexx
Subject: Re: What REXX commands are CPU hogs ?
Date: 29 Jan 1996 17:58:45 GMT

In <4egolj$huj@news-e1a.megaweb.com>, JayWeber@gnn.com (Jim Bortmas) writes:
>Can anyone rank REXX functions, utilities and keyword commands
>by execution times. To improve my programming skills it would
>help to know what commands to avoid when alternative methods
>can be used. I don't expect a complete list so any guidance is
>appreciated.

The best answer, IMHO, is to write the application in a straight-forward and
readable manner, use the functions and statements which will allow you to
do that, and avoid the tricks and "neat hacks" to get around the "hog-ish"
command or function. In the long run, you'll be better off, and so will the
programmer that follows you.

If you go off on a witch hunt to avoid using SUBSTR or some other function,
chances are very good that in some future release of the REXX or operating
system you are using, the SUBSTR performance will be improved, and your
code will look silly to the next person that comes along after that.

Learn the language. Computers are (generally) fast enough now that individual
command or function performance within a language isn't supposed to be an
issue. (Before everyone flames, I know that's not always true; But it is supposed
to be the goal.) Use the language, and look at the overall performanace
afterward. Then, look at your methods first. You'll gain more performance by
improving your logic than you'll ever get by avoiding "hog-ish" functions, and
the application will perform better longer, and be more maintainable.

My two cents...

   Bob Nix

From news.ios.com!vyzynz!news1.cris.com!newshost.comco.com!news.tamu.edu!bcm.tmc.edu!news.msfc.nasa.gov!newsfeed.internetmci.com!howland.reston.ans.net!psinntp!psinntp!psinntp!psinntp!clothos.candle.com!phobos.candle.com!news Fri Feb  2 21:43:20 1996
Path: news.ios.com!vyzynz!news1.cris.com!newshost.comco.com!news.tamu.edu!bcm.tmc.edu!news.msfc.nasa.gov!newsfeed.internetmci.com!howland.reston.ans.net!psinntp!psinntp!psinntp!psinntp!clothos.candle.com!phobos.candle.com!news
From: GNORR@gnorr.candle.com@
Newsgroups: comp.lang.rexx
Subject: Re: What REXX commands are CPU hogs ?
Date: 29 Jan 1996 18:47:05 GMT
Organization: Candle Corporation
Lines: 27
Distribution: inet
Message-ID: <4ej4na$t7f@phobos.Candle.Com>
References: <4egolj$huj@news-e1a.megaweb.com>
Reply-To: GNORR@gnorr.candle.com
NNTP-Posting-Host: gnorr.candle.com
X-Newsreader: IBM NewsReader/2 v1.2

In <4egolj$huj@news-e1a.megaweb.com>, JayWeber@gnn.com (Jim Bortmas) writes:
>Can anyone rank REXX functions, utilities and keyword commands
>by execution times. To improve my programming skills it would
>help to know what commands to avoid when alternative methods
>can be used. I don't expect a complete list so any guidance is
>appreciated.

This isn't intended to be a facile or rude response, but wouldn't finding
this for yourself out be an excellent way of working on your programming
skills?

You might want to bear in mind that REXX isn't intended to be a super-fast
or super-efficient language for running programs, but is rather intended
to be a language for easy writing of programs.

You will probably find that 99 times out of 100 using a REXX function or
command is the most efficient way to do something because while in the
function the code is running native machine code rather than interpreting
text. One good rule of thumb is to do things the easiest way possible. For
example, INTERPRET is difficult to use because it adds an extra layer
of interpretation which can be confusing to interpret (pun intended): it
is also slow because of the double interpretation, but it is sometimes
the only way to get something done.

====== Graham C. Norris ========= GNORR@gnorr.candle.com =======
===== Opinions expressed here are not those of my employer =====


