DMD internal: appendToModuleMember performance
Walter Bright via Digitalmars-d
digitalmars-d at puremagic.com
Fri Apr 22 16:49:22 PDT 2016
On 4/22/2016 4:31 PM, Walter Bright wrote:
> On 4/22/2016 3:16 PM, David Nadlinger wrote:
>> One of them is
>> https://github.com/dlang/dmd/blob/5ea445c68451152d43595c9de4797b6ec1e4f57d/src/dtemplate.d#L6503,
>>
>> I think.
>
> Definitely one.
>
BTW, this looks like a particularly bad piece of engineering. The trouble is, it
saves an index to the member, then does a bunch of semantic processing, then
deletes what is on that index. But what if the members[] in the meantime shifts
around?
There is an assert for that case, so it at least won't cause corruption, but it
looks bad.
More information about the Digitalmars-d
mailing list