It was tested on ARMv4.
news.austin.rr.com wrote:
> what chip was the test on?
>
> thanks.
>
> "Sergey Bogdanov" <sergey.bogdanov@gmail.com> wrote in message
> news:OPiOvO6EFHA.1264@TK2MSFTNGP12.phx.gbl...
>
>>I have noticed that Int32 is a bit faster than Int16. I had this test
>>for Int32 measurement:
>>
>>const int Tries = 1000;
>>private long Test1Int32()
>>{
>>Int32 [] aa2 = new Int32[100001];
>>long total = 0;
>>for(int a = 0; a < Tries; a++)
>>{
>>long l = OpenNETCF.Win32.Core.QueryPerformanceCounter();
>>for(int i = 0; i < 100000; i++)
>>{
>>aa2[i] = 100;
>>}
>>l = OpenNETCF.Win32.Core.QueryPerformanceCounter() - l;
>>total += l;
>>}
>>
>>return total / Tries;
>>}
>>
>>and the same test for Int16 array. It seems that "stelem.i2" works
>>slower than "stelem.i4" and that is why an array with Int16 element is
>>slower. The same results I had for "Int16Var++" and "Int32Var++" for
>>this test:
>>
>>private long Test2Int32()
>>{
>>Int32 aa2 = 0;
>>long total = 0;
>>for(int a = 0; a < Tries; a++)
>>{
>>aa2 = 0;
>>long l = OpenNETCF.Win32.Core.QueryPerformanceCounter();
>>for(int i = 0; i < 30000; i++)
>>{
>>aa2++;
>>}
>>l = OpenNETCF.Win32.Core.QueryPerformanceCounter() - l;
>>total += l;
>>}
>>
>>return total / Tries;
>>}
>>
>>Hope this help,
>>Sergey Bogdanov
>>
http://www.sergeybogdanov.com >>
>>
>>news.austin.rr.com wrote:
>>
>>>Do ARM or XScale chips execute Int16 faster than Int32 or do the 32bit
>>>registers handle Int32 faster?
>>>
>>>thanks
>>>
>>>
>
>