[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: Question on VA@ parsing



Reply to note from Harry Binswanger  Sat, 17 Apr
2004 21:11:54 -0400

> Yes, I thought the VA@ way might be faster--do you have any
> opinion on that, or do I need to run timing tests?

XS is slightly faster in my tests -- by less than one-thousandth of
a second on my ancient Pentium 200. Time it for yourself. After
decoding, DeFine each example, (A) and (B), below, then issue
ITER 1000 to time 1000 iterations. Do this several times
and average the durations, then take the difference between the two
averages. Divide by 1000 to get the difference for a single
iteration.

XPLeNCODE v2.0
b-gin [UNTITLED]
;*; (A)[cr|lf]{<}SV01,RED|GREEN|BLUE|YELLOW{>}{<}SX02,0{>};*;
[cr|lf]{<}LBa{>}{<}SX02,{<}PV02{>}+1{>}{<}SX03,"{<}VA@01|"+{<
}IS02{>}+"{>}"{>}{<}SX03,{<}PV03{>}{>}{<}IF{<}VA|03{>}>0{>}{<
}GLa{>}{<}EI{>}{<}EX{>}[cr|lf][cr|lf];*; (B)[cr|lf]{<}SV01,RE
D|GREEN|BLUE|YELLOW|{>}{<}SV02,|{>};*;[cr|lf]{<}LBa{>}{<}SV03
,{>}{<}XS01,02,04,,03{>}{<}SX01,{<}IS03{>}{>}{<}IF{<}VA|01{>}
>0{>}{<}GLa{>}{<}EI{>}{<}EX{>}[cr|lf][cr|lf]
-nd
XPLeNCODE


--
Carl Distefano
cld@xxxxxxxx