Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Index
Message
From
31/01/2005 12:02:47
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
To
31/01/2005 09:08:50
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Re: Index
Miscellaneous
Thread ID:
00982167
Message ID:
00982289
Views:
34
>James,
>
>What I wrote (the performancewise bit) is imo the fastest you can get it in vfp, without dlls or flls
>
>>Your suggestion using FUNCTION CharBitNot looks good to me, as that's exactly what I do ... although the internals of my function are different:
>>
>>
FUNCTION Reversechars(lcChars)
>>   LOCAL lnI
>>   FOR lnI=1 TO LEN(lcChars)
>>      lcChars=STUFF(lcChars,lnI,1,CHR[255-ASC(SUBSTR(lcChars,lnI,1))])
>>   ENDFOR
>>   RETURN lcChars
>>ENDPROC
>>
One thing would be much faster - and that is to avoid the repeated calculation of the ReverseChars (or Bitnot or whatever) function. If this index is going to be in heavy use, I'd have a shadow field of the reversed field, where I would store this reversed value (character field of same length, NoCPTrans), and index on that. The function would need to be invoked only when the actual field is updated. Something to delegate to a bizobject, or even lower.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform