variable x cannot be read at compile time (ctfe)

maarten van damme maartenvd1994 at gmail.com
Mon Dec 17 14:42:02 PST 2012


How do I make dmd output asm?

I wrote a simple test and for a simple int[] array it was 2,5 times slower.

2012/12/17 bearophile <bearophileHUGS at lycos.com>:
> maarten van damme:
>
>
>> it's odd that the resulting arraylist is slower to access at runtime
>> then the arraylist generated at runtime... Is there a reason for this?
>
>
> In such cases, beside thinking some time about the topic, one solution is to
> take a look at the asm.
>
> Maybe it's the same problem as with enum arrays, they get copied like
> literals every time you use them.
>


More information about the Digitalmars-d-learn mailing list