Pages: [1]   Go Down
Author Topic: Is Arduino code interpreted? Fez Panda .NET x ?  (Read 1883 times)
0 Members and 1 Guest are viewing this topic.
Brazil
Offline Offline
God Member
*****
Karma: 3
Posts: 616
Wusik Dot Com
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Guys, just trying to understand one thing. Is the Arduino code interpreted?

I wonder about this, as the Arduino board I'm looking at is 16Mhz 8 bits, while Fez Panda is 72Mhz 32 bits.

http://www.tinyclr.com/compare/

BUT, Fez Panda runs .NET interpreted code, so you don't actually get 72Mhz from what I could tell, right?

I will check the list of .NET C# functions Fez Panda supports without interpretation, so I know how it will run against an Arduino Mega, for instance.

Thanks, Wk
Logged


0
Offline Offline
Newbie
*
Karma: 0
Posts: 35
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Arduino is native code. No interpreter involved. Probably means that 72Mhz FEZ thing is more like a 1Mhz AVR if it's having to run a load of MS bloat as well smiley-wink
Logged

Brazil
Offline Offline
God Member
*****
Karma: 3
Posts: 616
Wusik Dot Com
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

That's what I was thinking. ;-) And it has more RAM, BUT, with .NET on the thing been interpreted, its like 1 byte...  ;D Sorry, couldn't resist.

I was just wondering about it. I don't like MS anyway. What I like about the Arduino is that its REALLY open-source, no MS BS involved...

Thanks, that's exactly what I needed to know. :cool:

Wk
Logged


Brazil
Offline Offline
God Member
*****
Karma: 3
Posts: 616
Wusik Dot Com
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Humm, but lets be fair, it does have native calls too, I just couldn't find a list yet...  :smiley

http://en.wikipedia.org/wiki/.NET_Micro_Framework

Here's some extra info:

Quote
How does .NET Micro Framework work? Is it fast?
.NET Micro Framework is a very large set of libraries and a core CLR (interpreter).When you write an application in Visual Studio and run it, Visual Studio will transfer your code to the device and store it in a reserved region. This region of the chip is reserved for your managed application. Note that your application is only what you write, it doesn't include the NETMF libraries since they are already stored on the device via the firmware.

Lets say you write a program to read XML files. Your program will be simple. The complex work is done in FAT file system and XML libraries. Those libraries are already included in the framework (in the firmware).

Now, is it fast? Yes, it is fast depending on if you write your code right. It is a fact that managed code runs much slower than native code. Managed code runs checks at runtime, so for example when you access an array in C/C++, you can easily go over the array boundary undetected and overwrite some random memory. This is an extremely difficult bug to catch. Modern managed languages like C# check every time you access an array to see if you are within the boundaries or not. Such checks are great but they have their performance penalties. The managed application is also interpreted, which also runs slower than native code. So if you're making a function that encrypts data, it will run too slow. Why? Because all the encryption code is interpreted. This is why NETMF includes a large set of libraries to accomplish many things including cryptography, for our example. When you try to encrypt the data, you will simply be passing your data onto the internal code which is not interpreted and it runs very fast.

Someone can comment and say, I can toggle a pin faster on an 8bit micro than I can on NETMF devices! This is correct, but what kind of project only toggles a pin? Make a decently sized project and then compare speed. Try our example from earlier, read an XML file from a USB thumb drive and parse it. 8bit devices will probably not be capable of doing so and if they did it will be slower than NETMF. In short, use the built-in functions as much as you can and your project will run fast.

So, where can I get a list of those functions that runs faster?  smiley-sad

Wk
Logged


Western New York, USA
Offline Offline
Faraday Member
**
Karma: 39
Posts: 4384
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Guys, just trying to understand one thing. Is the Arduino code interpreted?
It is compiled, as opposed to interpreted.  Read the first two sentences here http://en.wikipedia.org/wiki/Interpreted_language for the difference.

Don
« Last Edit: October 16, 2010, 02:44:19 pm by floresta » Logged

St. Leonards-on-Sea, E. Sussex, UK.
Offline Offline
Sr. Member
****
Karma: 2
Posts: 301
Ancient developer
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The FEZ boards should be able to use a conventional ARM compiler, they appear to have a JTAG connector for programming and debugging.
Logged

Leon Heller
G1HSM

Pages: [1]   Go Up
Jump to: