auto

Tobias Brandt tob.brandt at googlemail.com
Thu Nov 24 13:27:08 PST 2011


>> is there any performance gap using auto instead of int or other>> type? For example>> >> int[] ar1 = new int[1000];>> auto[] ar2 = new int[1000];>> >> are these equivalent by a perfomance point of view?
>> Well the runtime performance is equal but of course compilation takes
> slightly longer since it has to deduce the type first.

The type has to be deduced anyway for type checking the
assignment/initialization.


More information about the Digitalmars-d-learn mailing list