"Scott Ballinger" <[EMAIL PROTECTED]> wrote on 05/13/2005 05:10:49 PM:
> In UV at least (not sure about UD) attribute processing has improved > dramatically since "the old days," to the point where it is essentially > instant. When you're going sequentially through a dynamic array, that is true. Change your code to reference the elements randomly, and I predict you'll see a huge difference between dynamic and dimensioned. In most real-life programs, you'll see it pull something from attribute 23, then something from attribute 7, and something else from attribute 97. In my experience, it's rare that you see something neatly step through an array. I do agree with others that "it depends". It depends not only on how many attributes are in the file, but how big those attributes are. Unfortunately, it's pretty common to put name and address information - usually pretty beefy and infrequently accessed stuff - at the beginning of the record, while smaller and more frequently accessed stuff is after it. That means you're parsing through the bytes comprising the names and addresses many times. I recently helped a customer with their performance problems. They had some very large records that were being referenced in a batch process. Whenever this process was run, CPU idle time went to zero and the system ground to a halt. By changing the reference to dimensioned rather than dynamic, the process sped up drastically and CPU became almost completely idle. Changing a few lines of code made a huge difference, not only to this program, but system-wide. This customer was running a recent release of UniVerse, so it had nothing to do with the parsing changes (which were added a long time ago anyway). I have many other real-life stories just like this on UniData and UniVerse. For small records where you're plucking or stuffing a few bits of information, dynamic arrays will do the job. But dimensioned arrays definitely have their place. Hardware delivers much more bang for the buck than just a few years back, but inefficiencies have a way of catching up with you. Tim Snyder Consulting I/T Specialist , U2 Professional Services North American Lab Services DB2 Information Management, IBM Software Group 717-545-6403 [EMAIL PROTECTED] ------- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/