[Issue 13159] std.socket.getAddress allocates once per DNS lookup hit

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Aug 29 14:55:15 PDT 2015


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

--- Comment #6 from Jakob Ovrum <jakobovrum at gmail.com> ---
(In reply to Vladimir Panteleev from comment #5)
> The getAddress patch is fine. The getAddressInfo patch seems pointless to
> me, it does not preallocate any memory (but could be made to if the linked
> list is traversed twice).

Appender has gone through a lot of revision in recent years. Array appends
might be better today.

The difference is probably negligible; the getAddress patch was the main point.
The ideal would be a lazy range version of getAddressInfo. With both
`getAddress` and `getAddressInfo` taken, bikeshedding ahoy :)

--


More information about the Digitalmars-d-bugs mailing list