More zero-initialization optimizations pending in std.experimental.allocator?
Per Nordlöw
per.nordlow at gmail.com
Sun Oct 21 11:09:54 UTC 2018
On Saturday, 20 October 2018 at 15:10:38 UTC, Nathan S. wrote:
>> are there more zero-initializations that can be optimized in
>> std.experimental.allocator?
>
> I looked and identified low-hanging fruit in
> std.mutation.initializeAll & moveEmplace and in
> std.typecons.RefCounted (PR #6698), and in
> std.conv.emplaceInitializer (PR #6461).
What did you search for to find these?
> Other opportunities would rely on being able to identify if
> it's ever more efficient to write `memset(&x, 0,
> typeof(x).sizeof)` instead of `x = typeof(x).init` which seems
> like the kind of optimization that belongs in the compiler
> instead.
So in which cases is `memset` faster than assignment?
Thanks!
More information about the Digitalmars-d
mailing list