List of Phobos functions that allocate memory?

Andrej Mitrovic andrej.mitrovich at gmail.com
Sat Feb 8 00:20:15 PST 2014


On 2/7/14, Jonathan M Davis <jmdavisProg at gmx.com> 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.


More information about the Digitalmars-d mailing list