Livecode performance problem
Alex Tweedly
alex at tweedly.net
Sat Aug 20 17:59:47 EDT 2022
I can't answer for anyone else, but for me - because I never thought
about it :-)
Combine by column - never used it before, so never thought of it.
It's significantly faster, roughly 40% improvement over the previous best.
Note, the spec requires that each line begins with the line number, so
you need to add something like:
> local tmp
> repeat with i = 1 to the number of lines in g1
> put i &CR after tmp
> end repeat
> put tmp into x[1]
>
> put g1 into x[2]
> put g2 into x[3]
> put g3 into x[4]
> put g4 into x[5]
and finish off with
combine x by column
put cr after x
to fully match the earlier results.
Alex.
On 20/08/2022 18:45, David Epstein via use-livecode wrote:
> I didn’t text the speed, but why not
>
> put fld A into x[1]
> put fld B into x[2]
> put fld C into x[3]
> put fld D into x[4]
> combine x by column
> return x
>
>> I have a set of fields, call them A, B, C, and D. Each has the same
>> number of lines. Each field has different text (per line)
>>
>> I need to combine the data - frequently - into a form that look like:
>>
>> <i><tab><line i of fld A><tab><line i of fld B><tab><line i of fld
>> C><tab><line i of fld D><cr>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list