On 2/7/14, Jonathan M Davis <[email protected]> wrote: > However, I would argue that assuming that everyone is going to validate > their > strings and that pretty much all string-related functions shouldn't ever > have > to worry about invalid Unicode is just begging for subtle bugs all over the > > place IMHO.
I suggested we would introduce an overload, not replace the existing function, so this isn't an issue. > The problem is that you need to check it. This is _slower_ than exceptions in the normal case, as invalid Unicode should be the rare case. Do you have any benchmarks for this? I have vague memory about complaining that the exception code is *de-facto* slower, regardless of input. But I'll try to provide some test-cases later and see where we're at.
