[Issue 17210] DMD's Failure to Inline Calls in std.array.Appender.put Cause 3x Slowdown

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Mar 3 14:43:39 PST 2017


https://issues.dlang.org/show_bug.cgi?id=17210

--- Comment #2 from Jack Stouffer <jack at jackstouffer.com> ---
BTW, making this @safe by changing the manual code to

            static if (isBasicType!U)
            {
                auto d = (() @trusted => _data.arr.ptr[0 .. len + 1])();
                d[len] = cast(Unqual!T) item;
                _data.arr = d;
            }

makes the code twice as slow as the other manual version

--


More information about the Digitalmars-d-bugs mailing list