Subject: | |
From: | |
Reply To: | |
Date: | Mon, 21 Oct 2002 11:14:24 -0700 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
> Using the STRING and UNSTRING verbs are hundreds of time faster
> than trying to pick apart the string using indexing one
> character at a time.
That would depend upon implementation of the compiler, and the
architecture of the machine and model, and even the surrounding
code. My experience with 9xx models in 85 COBOL is that
hand-coded loops are faster. STRING and UNSTRING call runtime
routines (COB_STRING, ...) that implement the many options of
the statements, and the number of instructions required for
generalized function, as well as call/return overhead do not
promise better performance than a hand-coded loop, which may
be optimized by the compiler.
But if optimum performance is needed each alternative must be
tested and timed, with representative data. (I recommend
Michael Abrash's "Zen of Assembly" on this topic, even if you
aren't writing assembly).
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|
|
|