Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Index
Message
From
31/01/2005 12:05:59
 
 
To
31/01/2005 12:02:47
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Re: Index
Miscellaneous
Thread ID:
00982167
Message ID:
00982296
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.

TRUE. I would put it in the RecordValidation()
Gregory
Previous
Reply
Map
View

Click here to load this message in the networking platform