size_t for length on x64 will make app slower than on x86?

Maxim Fomin via Digitalmars-d digitalmars-d at puremagic.com
Sun Nov 16 06:24:46 PST 2014


On Sunday, 16 November 2014 at 13:39:24 UTC, FrankLike wrote:
> Many old projects need move from x86 to x64,but the 'length' 
> type is size_t,it will change on x64,so a lot of work must to 
> do.but I find some info which is help for d:
> http://www.dotnetperls.com/array-length.
> it means:
>   test length and longlength, and found 'test longlength' is  
> slower than 'test length'.
>
>   0.64 ns   Length
>   2.55 ns   LongLength
>
> I love D.So I don't want my app on x64 slower than on x86.
>
> Hope change in 2.067.
>
> Thank you all.

It means where you have uint x = arr.length you should have had 
size_t x = arr.length from the very beginning.


More information about the Digitalmars-d mailing list