boost crowd.

Walter Bright newshound2 at digitalmars.com
Thu Dec 1 03:02:47 PST 2011


On 11/29/2011 1:46 AM, Peter Alexander wrote:
> Which means you also get a horrible O(n) algorithm for something that should be
> a couple of compares. Why DMD does this is beyond me.

I did it to get it up and running, and haven't revisited that yet.


> Global float arrays can bloat executables as well:
>
> __gshared int[1_000_000] thisGoesInBss; // barely adds anything
> __gshared float[1_000_000] thisGoesInData; // adds 4MB to exec
>
> float arrays are initialised to NaN in D (in C they init to 0.0f), so they can't
> go in the .bss section (unless you explicitly init to 0.0f).

True, but using large statically allocated arrays of any sort is usually a 
suboptimal solution. It's better to new or malloc them.


More information about the Digitalmars-d mailing list