On Thu, 2004-06-10 at 12:48, Steve Wampler wrote:
>
> NextChar = (TAB(*P) LEN(1) $ c TAB(*Q)) $ x
> FindChar = BREAK(*c) $ y SPAN(*c) $ c
> UpdateP = *?(P = P + 1) FAIL
> UpdateQ = *?(Q = Q + SIZE(c))
> FunnySort = NextChar (FindChar | UpdateP) UpdateQ
> LOOP S = INPUT :F(END)
> Temp = &ALPHABET S
> P = 0
> Q = 256
> FunnySort Temp FunnySort = x c y :S(FunnySort)
> Temp TAB(256) REM $ S
> OUTPUT = S :(LOOP)
> END
>
>
> I *think* there's a bug in the second program not picking up the
> last character in each input line correctly, but I'm probably
> wrong or it is an artifact of my changes.
I did a little playing - and one quick solution to the problem
this version has is to add &FULLSCAN = 1 at the beginning.
Then the output is correct.
> Second program (much more reasonable times!):
> Case 1:
> 38.46s user 0.13s system 99% cpu 38.718 total
> Case 2:
> 22.70s user 0.06s system 99% cpu 22.831 total
With fullscan mode turned on, the time for case 1 is:
79.34s user 0.13s system 99% cpu 1:19.69 total
--
Steve Wampler -- [EMAIL PROTECTED]
The gods that smiled on your birth are now laughing out loud.
-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
>From Windows to Linux, servers to mobile, InstallShield X is the
one installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
_______________________________________________
Unicon-group mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/unicon-group