Beta D 2.071.2-b3

David Nadlinger via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Sat Sep 3 09:22:02 PDT 2016


On Saturday, 3 September 2016 at 14:40:37 UTC, Martin Nowak wrote:
> Yes, it does help. As private prevents usage outside of a 
> module it allows to do some optimizations that required whole 
> program analysis otherwise, e.g. variables and functions can 
> get internal linkage, thus reducing loads/stores and indirect 
> calls.

This doesn't really work that easily due to templates that depend 
on private data, and private data being referenced from alias 
parameters.

Of course, all such cases can still be statically detected when 
compiling the module in question, but this is quite a bit less 
trivial than just looking at the protection level.

  — David


More information about the Digitalmars-d-announce mailing list