HP3000-L Archives

October 2002, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Dave Waroff <[log in to unmask]>
Reply To:
Dave Waroff <[log in to unmask]>
Date:
Mon, 21 Oct 2002 11:14:24 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (22 lines)
> 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 *

ATOM RSS1 RSS2