>>>Fabio,
>>>
>>>>Fast is a relative concept.
>>>>A O(n)*1s or O(n)*1ms are two different thing.
>>>
>>>Yes, if I had code that took one second per n I wouldn't run very large values of n through the code. That should be pretty obivious to everyone.
>>>
>>>>>CHRTRAN() is already fast enough under the LEN(param2)=LEN(param3) condition, so no other alternate code is required. VFP has
O(n) performance when doing character for character substitution.
>>>
>>>
>>>lcStr = "abcdefghijklmnop"
>>>
>>>for i = 1 to 6
>>> lcStrTran = replicate( lcStr, 10 ^ i )
>>> ltStart = seconds()
>>> lcX = chrtran( lcStrTran, lcStr, lcStr )
>>> ltStart = seconds() - ltStart
>>> ? i, len( lcStrTran ), ltStart
>>>endfor
>>>
>>>
>>>Even on this cruddy 2gh Celeron box VFP does 16 million character translations and puts it in the output buffer in 0.73 seconds so that makes it 0.045625 microseconds per n.
>>>
>>>So, tell us all how right to left would make it any faster, much lest a thousand times faster... please we are all curious.
>>
>>VFP CHRTRAN, when don't remove character, don't use a
O(n)>>( because this not exist ), but it use a
O(n*m) program.
>>
>>Any developer, with a little backgroud, known that this task can to be make
>>in
O((n+m)*Log(min(n,m))).
>
>hi Fabio,
>
>ROFL, looks like you have not run out of patience either
You are right, but David it is therefore likeable.
hi.