3 ms·
They are logically equal (that is, they represent the same text in an abstract way), but computing this equality in practice is expensive, because you first nee
by nextaccountic 3y ago
They are logically equal (that is, they represent the same text in an abstract way), but computing this equality in practice is expensive, because you first need to normalize the strings then compare.
Most languages, when comparing strings, skip the normalization and just compare string bytes as is (or, if the string is interned, compare just the pointer)
- rurban 3y agoYou can easily do the comparison dynamically with checking for combining marks, and then do the proper lookup. No need to normalize everything, or even store the normalized variant. Though in a filesystem or username lookup you would only store it normalized.