Why 16Mib static array size limit?

Yuxuan Shui via Digitalmars-d digitalmars-d at puremagic.com
Wed Aug 17 15:12:25 PDT 2016


On Wednesday, 17 August 2016 at 19:36:17 UTC, Walter Bright wrote:
> On 8/17/2016 5:20 AM, deadalnix wrote:
>> Controlling aliasing is really the #1 optimization barrier 
>> these days, so I
>> don't think it's that good of a thing.
>>
>> Almost every single one case where Rust end up being faster 
>> than C++ is because
>> their type system allow for more AA information available for 
>> the optimizer.
>>
>> AA is also key to do non GC memory management at language 
>> level.
>
> At least for this case, as I mentioned in another post, if the 
> pointer and length of the global is cached in a local, it can 
> be cached in a register. The contents of locals don't have 
> aliasing problems because if their addresses are not taken, 
> nobody can point to them. Optimization relies heavily on that.

But doing so would be incorrect if D doesn't provide strong 
aliasing guarantees. And if D does provide these guarantees, we 
won't need to do this manually.


More information about the Digitalmars-d mailing list