HP3000-L Archives

December 1998, Week 1

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:
Bruce Toback <[log in to unmask]>
Reply To:
Bruce Toback <[log in to unmask]>
Date:
Tue, 1 Dec 1998 20:16:42 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (42 lines)
X-no-Archive:yes

Cliff Scott writes:

>In the old days of Image, we used list processing.  We would do a DBGET
>at the begining of the program for each set and then use the previous
>list for later DBGETS.
>
>I was told the other day not to do that because with the large amount of
>memory the 3K has, that I am just wasting CPU time.

The reason to use an item list rather than an @ list has very little to
do with memory. It has a lot more to do with maintainability.

If you use an @ list, you have to recompile every program when you add
items to a dataset, or move them around. If you happen to miss one
program, you get anything from wrong answers to program aborts. By using
a list, you don't have to worry when modifying the data base unless
you're actually changing the size of an item. This seems to be a much
less frequent transformation than adding more items.

In the last few projects I've done, I've enforced a "no @ lists, ever"
rule. The result has been that I can add new functionality very quickly
because almost no old code ever has to be touched.

The extra CPU time is not significant, and using lists is a nice -- and
cheap -- insurance policy. There's not much value in being able to
calculate the wrong answer very quickly.

-- Bruce


--------------------------------------------------------------------------
Bruce Toback    Tel: (602) 996-8601| My candle burns at both ends;
OPT, Inc.            (800) 858-4507| It will not last the night;
11801 N. Tatum Blvd. Ste. 142      | But ah, my foes, and oh, my friends -
Phoenix AZ 85028                   | It gives a lovely light.
btoback AT optc.com                |     -- Edna St. Vincent Millay
Mail sent to [log in to unmask] will be inspected for a
fee of US$250. Mailing to said address constitutes agreement to
pay, including collection costs.

ATOM RSS1 RSS2