>Thomas,
>
>The relative performance difference is still the same if shorter strings are escaped.
As the "lcEscape = replicate( "%", lnLength / 2 * 3 )" is included as well as the calling overhead of the parameters I do believe the factor between both measurements will be different if you are repeating the call a couply of thousand times for smaller strings. If the source string length is more in the range of 50 - 200, Substr() should be faster.
>And it really shows the power of being able to just run a pointer from one end of the string to the other instead of making some function call to to extract one character at a time.
No doubt about that - I think that a combination of very high level language like vfp or python with the option to code critical parts in C is very hard to beat - if you code in each environment to the particular strength<g>.
>Also this escape obfuscation would only annoy a script kiddie for a moment or two that it would take to turn it back into readable Java. *s*
<g>
regards
thomas
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement