Page 2 of 2

Re: how to convert an ARRAY into Linklist.

PostPosted: Fri Apr 19, 2013 2:13 pm
by BillyBoyo
You can't just think of another way of representing an "array" and then just hope its use is going to be faster.

From the key that you have specified and the ODO, it looks like you are using SEARCH ALL? Is this so?

You have defined your data poorly. WST-TXT-MX-COUNT is a USAGE DISPLAY field. If you make it BINARY it will save some instructions. Same for WST-TXT-MX-MAX. You have an INDEXED BY, but without a USAGE INDEX field containing the maximum value, you will again be generating more instructions than necessary.

If you show how the "array" is loaded, how it is "searched" and how data is taken from it, including all relevant data definitions, in the Code tags, then we can probably chop off some CPU usage.

If you want to do a "linked list" which is optimised for a binary search, then you'd have to be more sure of your coding than your data definitions so far may indicate. If you use one which is unoptimised for a binary search, then your CPU use is going to increase considerably.