Scott Meyers' DConf 2014 keynote "The Last Thing D Needs"
    Jesse Phillips via Digitalmars-d-announce 
    digitalmars-d-announce at puremagic.com
       
    Thu May 29 07:20:39 PDT 2014
    
    
  
On Thursday, 29 May 2014 at 13:11:52 UTC, Steven Schveighoffer 
wrote:
> IIRC, the entire section of global TLS data is initialized, and 
> is all contiguous memory, so it would be anti-performant to 
> initialize all but 4 bytes.
     int x2;
     float f2;
These are both TLS and they init to different values, I suppose:
     float f2prime = void;
would mean f2prime is 0 and not float.init. Otherwise what you 
state is kind of what I was expecting.
> Note:
>
> struct X
> {
>   int a;
>   int b = void; // also initialized to 0.
> }
>
> This is because X must blit an init for a, and it would be 
> silly to go through the trouble of blitting X.init to a, but 
> not b. Especially, for instance, if you had an array of X 
> (you'd have to blit every other int!)
>
> -Steve
Thanks for the bonus example.
    
    
More information about the Digitalmars-d-announce
mailing list