slow CF 1.0

  • Thread starter Thread starter Andrej Kampos
  • Start date Start date
A

Andrej Kampos

Please Help me, I make simple program for calculation :

long ms = DateTime.Now.Ticks / 10000 ;
System.Console.WriteLine( " {0} " , ms - msOld ) ;*/

int begin = System.Environment.TickCount;
for ( int i=0; i<100000000; ++i )
{
int a = 10;
double b = 10.0;
int aa = a * a;
double bb = b * b;
double ret = bb / aa * aa;
}
int end = System.Environment.TickCount - begin;
System.Console.WriteLine( end );


HW PC 1.6 Ghz , WinCE 4.2 , CF 1.0 , ( PentiumM ) - calculation time
- release 8415 ms
- debug 10222 ms

HW PC 1.4 Ghz , WinXP Prof. .NET 1.1 ( PentiumM ) - calculation time

- release 220 ms
- debug 5067 ms

Does anybody have idea what causes such dramatic difference of overall
calculation time?

Thanks
Andrej.
 
The forst system uses a WinCE emulator, and the second a PocjketPC
emulator for tests?
 
Sample program is build as a Smart Device Console Application for .net
compact framework. I am able to run it on XP without emulator (as a
normal console application) and on WinCE 4.2 does not need emulator at all.



Diego Guidi napsal(a):
 
That's quite expected as NETCF V1 has optimized JIT only on ARM; all other
CPUs are quite slow.

Also, I'm not sure it would actually use FPU to do the math. Performance has
been significantly improved for NETCF V2 with unified JIT for all platforms.

Anyway, for such a powerful device you might be better off using XP embedded
with full framework instead of CE.


Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).
 
Thanks

but I tested this simple program for WinCE 5.0 and CF 2.0 time was
only 1 second quicker as WinCE 4.0 CF 1.0 .

WinCE 4.0 CF 1.0 8415 ms
WinCE 5.0 CF 2.0 7145 ms

Best regards
Andrej

Ilya Tumanov [MS] napsal(a):
 
That is a 15% gain....

--
Chris Tacke
Co-founder
OpenNETCF.org
Are you using the SDF? Let's do a case study.
Email us at d c s @ o p e n n e t c f . c o m
http://www.opennetcf.org/donate


Andrej Kampos said:
Thanks

but I tested this simple program for WinCE 5.0 and CF 2.0 time was only 1
second quicker as WinCE 4.0 CF 1.0 .

WinCE 4.0 CF 1.0 8415 ms
WinCE 5.0 CF 2.0 7145 ms

Best regards
Andrej

Ilya Tumanov [MS] napsal(a):
That's quite expected as NETCF V1 has optimized JIT only on ARM; all
other CPUs are quite slow.

Also, I'm not sure it would actually use FPU to do the math. Performance
has been significantly improved for NETCF V2 with unified JIT for all
platforms.

Anyway, for such a powerful device you might be better off using XP
embedded with full framework instead of CE.


Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no
rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).
 
--
Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).

Andrej Kampos said:
Thanks

but I tested this simple program for WinCE 5.0 and CF 2.0 time was only 1
second quicker as WinCE 4.0 CF 1.0 .

WinCE 4.0 CF 1.0 8415 ms
WinCE 5.0 CF 2.0 7145 ms

Best regards
Andrej

Ilya Tumanov [MS] napsal(a):
That's quite expected as NETCF V1 has optimized JIT only on ARM; all
other CPUs are quite slow.

Also, I'm not sure it would actually use FPU to do the math. Performance
has been significantly improved for NETCF V2 with unified JIT for all
platforms.

Anyway, for such a powerful device you might be better off using XP
embedded with full framework instead of CE.


Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no
rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).
 
Here's a quote from our JIT guru:

"All floating point operations in managed code end up calling out to helper
functions; the JIT compiler doesn't generate inline native instructions like
it does for 32-bit integer operations. This is not a large overhead on our
most common ARM-based platforms because they use emulation. But it is very
noticeable on platforms like x86 that have FP hardware."

Desktop x86 JIT inlines FP instructions, so it's way faster compared to
NETCF.


Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).

Andrej Kampos said:
Thanks

but I tested this simple program for WinCE 5.0 and CF 2.0 time was only 1
second quicker as WinCE 4.0 CF 1.0 .

WinCE 4.0 CF 1.0 8415 ms
WinCE 5.0 CF 2.0 7145 ms

Best regards
Andrej

Ilya Tumanov [MS] napsal(a):
That's quite expected as NETCF V1 has optimized JIT only on ARM; all
other CPUs are quite slow.

Also, I'm not sure it would actually use FPU to do the math. Performance
has been significantly improved for NETCF V2 with unified JIT for all
platforms.

Anyway, for such a powerful device you might be better off using XP
embedded with full framework instead of CE.


Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no
rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).
 
I understand it now. Thank you.

Best regards,
Andrej


Ilya Tumanov [MS] napsal(a):
Here's a quote from our JIT guru:

"All floating point operations in managed code end up calling out to helper
functions; the JIT compiler doesn't generate inline native instructions like
it does for 32-bit integer operations. This is not a large overhead on our
most common ARM-based platforms because they use emulation. But it is very
noticeable on platforms like x86 that have FP hardware."

Desktop x86 JIT inlines FP instructions, so it's way faster compared to
NETCF.


Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).

Thanks

but I tested this simple program for WinCE 5.0 and CF 2.0 time was only 1
second quicker as WinCE 4.0 CF 1.0 .

WinCE 4.0 CF 1.0 8415 ms
WinCE 5.0 CF 2.0 7145 ms

Best regards
Andrej

Ilya Tumanov [MS] napsal(a):
That's quite expected as NETCF V1 has optimized JIT only on ARM; all
other CPUs are quite slow.

Also, I'm not sure it would actually use FPU to do the math. Performance
has been significantly improved for NETCF V2 with unified JIT for all
platforms.

Anyway, for such a powerful device you might be better off using XP
embedded with full framework instead of CE.


Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no
rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).



Sample program is build as a Smart Device Console Application for .net
compact framework. I am able to run it on XP without emulator (as a
normal console application) and on WinCE 4.2 does not need emulator at
all.



Diego Guidi napsal(a):


The forst system uses a WinCE emulator, and the second a PocjketPC
emulator for tests?
 
Back
Top