On 02/14/2011 08:29 PM, Mattias Gaertner wrote:
For instance searching needs a lot of compares. Comparing two
strings normally fails on the very first characters. An auto conversion
will always convert the whole string including allocating and releasing
memory, easily slowing down the conversion by an order of magnitude.
Very valid point !
So we could have an auto-converting compare function in the RTL, that
(when finding different encodings) does not do a complete conversion
first and comparing afterwards but converts each multi-byte character of
both strings to the 32 bit Unicode character and compares thee two
DWords, and stops after the first difference.
-Michael
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus