Is syntax a dead issue?

Geoff Canyon gcanyon at gmail.com
Mon Jul 25 10:15:20 EDT 2022


On Mon, Jul 25, 2022 at 12:00 AM jbv via use-livecode <
use-livecode at lists.runrev.com> wrote:

> Just curious : why do you use "read from file F for 1 line" ?
> Instead, why don't you read the file in one go, load the content
> into a variable and then use "for each line j in myVar" ?
> Wouldn't that run faster ?
>
> Best,
> jbv
>

My base version does all the processing in one go and ignores lines
entirely except as they count as white space. But the second set of
requirements for the task from the original post required dealing with
arbitrarily large inputs (it mentioned terabytes). It's not a completely
unrealistic concept: at the rate this goes on my Mac, it would take about
100 hours to process a terabyte input.

In any case, I just tried my base "all in one go" version on the 50mb test
file, and it's about 3x as fast as parsing line-by-line, which makes it
still among the slowest languages as far as I can tell -- no idea how my M1
Macbook Air compares to the machine he used.


More information about the use-livecode mailing list