Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Index
Message
De
31/01/2005 12:02:47
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
31/01/2005 09:08:50
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Re: Index
Divers
Thread ID:
00982167
Message ID:
00982289
Vues:
32
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform