Efficiency question for list modification
stephenREVOLUTION2 at barncard.com
Thu Mar 10 14:18:35 EST 2011
<top of head, not tested>
perhaps find a way to speed up the other code inside that is parsing and
doing the math.
can't you add an index (id) column to the data? even temporarily?
therefore create the arrays in a way where you can restore the original
On 10 March 2011 10:51, FlexibleLearning <admin at flexiblelearning.com> wrote:
> I have a long list of several thousand lines.
> Each line contains two comma-separated numbers.
> I want to divide the first item of each line by one divisor, and divide the
> second item of each line by a different divisor.
> The list order must stay the same.
> Using 2 and 5 as divisors...
> would become
> Using "repeat with n=1 to num of lines" takes far too long.
> Using "repeat for each line L" either attempts to modify read-only data, or
> is only 25% faster using a dumping variable.
> Using split/combine will mess up the ordering (numeric array keys are not
> sorted numerically with combine).
> Any other ideas?
> Hugh Senior
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
San Francisco Ca. USA
more about sqb <http://www.google.com/profiles/sbarncar>
More information about the Use-livecode