Relaxing the definition of isSomeString and isNarrowString
monarch_dodra via Digitalmars-d
digitalmars-d at puremagic.com
Mon Aug 25 13:21:14 PDT 2014
On Sunday, 24 August 2014 at 12:24:03 UTC, Andrei Alexandrescu
wrote:
> Look e.g. at
> https://github.com/D-Programming-Language/phobos/blob/master/std/utf.d#L1074.
> That's a memory allocation each and every time decodeImpl is
> called. I'm not kidding. Take a look at http://goo.gl/p5pl3D
> vs. http://goo.gl/YL2iFN. It's egregious.
Dmitry already replied, but I want to stress the reply. That's
complete BS. decodeImpl does *not* allocate. That line of code
has been commented on, tested and benched. The enum is only ever
used for CT indexing, which will *not* allocate.
I'm repeatedly seeing people complain that decoding is slow.
Maybe. And that it "allocates". But that's BS. A lot of people
have been repeating this false information now, and I find it
worrysome that both you and Walter have made this claim now.
More information about the Digitalmars-d
mailing list