relative benefit of .reserve and .length
Steven Schveighoffer via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon May 2 07:47:01 PDT 2016
On 4/29/16 6:10 AM, sigod wrote:
> On Thursday, 28 April 2016 at 14:08:26 UTC, Steven Schveighoffer wrote:
>> On 4/28/16 8:56 AM, Jay Norwood wrote:
>>> [...]
>>
>> .reserve should make an improvement for large amount of appending,
>> since you pre-allocate the data.
>>
>> [...]
>
> How about `assumeSafeAppend`? Does it have any positive impact on
> performance?
I don't know why you would call it. assumeSafeAppend is an expensive
no-op if you have appendable array.
-Steve
More information about the Digitalmars-d-learn
mailing list