A short time ago (a week or two), the discussion of uCs came up and I
pointed out that the Cortex M0 architecture had a good possibility to
displace the traditional 8-bit uCs, such as the 8051, AVR and PIC.
In my email today, I received this code-density study paper.
Granted, it's by a guy from NXP, with an ARM axe to grind, but for
whatever it's worth:
http://www.embeddeddeveloper.com/corp/flex/CodeDensity-NXP_IQ-30.pdf
This does remind me of an experience I had with the then-new x86
architecture. The local sales guy was pushing really hard for the
x86 to be the replacement for our 8085-based systems, pointing out
that x86 code was far more efficient space-wise than x80 code and
that translation tools were available to make the switchover easy.
I gave in and cooked up a code sample that used our floating-point
package to compute pi--a verifiable result. The FP code had the
dickens optimized out of it because it was high-use as part of a
BASIC runtime, so I thought it was a good candidate and at about 3000
lines, was non-trivial.
There was an MDS all set up at the sales office and I sumitted my
code on an 8" ISIS-II floppy for processing right after lunch. With
a wink, the sales engineer said "Oh, this should be easy--there's no
I/O". He cranked the translator up and we retreated to the
conference room for coffee.
Well, coffee turned into a free dinner and at 8 PM, the translator
was still grinding away. It never did finish, so I went home and
left the code with the sales guy.
About three weeks later, he called to say that they'd found the bug
in the translator and that my code was ready to test.
I was a bit surprised to see that it was almost two and a half times
larger than the original version. Worse, it didn't assemble--there
were errors. And when those were finally fixed, it didn't give a
correct answer--or any answer, for that matter. It simply died.
With a wave of his hand, the sales guy said that some "hand tweaking"
might be necessary. I responded that I might as well recode the
whole thing if I was going to have to debug it as working with
automatically generated translator code was not my idea of fun.
Thus, I take the NXP guy's claim with a small mountain of salt--but
it makes for interesting reading.
Best regards,
Chuck