Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
02/23/11 17:00
Read: times


 
Msg Score: +1
 +1 Good Answer/Helpful
#181262 - more data
Responding to: ???'s previous message
         8051/SDCC   AVR/gcc   ARM/gcc  ARM/gcc(*) PIC24/mcc30
FLASH         3566      3954      4584     6328     4458
no intvect    3566      3818      4380     6124     3696
RAM             85        70       132       80       70


Remarks:

  • PIC24 is a 16-bit family by Microchip; Snake was ported on my request by a friend who reported the results. mcc30 is a gcc-based compiler provided by Microchip for their 16-bit families, and was used in the "free" ("student") version (which implies that the supposedly highest level of optimisation could not be used)
  • the no intvect line reflects the code usage without the interrupt vector tables (there are no interrupts used in Snake)
  • the second ARM result (with asterisk) was compiled with a switch, causing structs (bitfields) to be packed, which results in less RAM usage but less efficient code (which needs to shift bits around and mask them)
  • it would be interesting to compare stack usage rather than the "static" RAM usage reported in the above table. Unfortunately, I have no simple means to measure that in either case. I would expect a more pronounced difference in stack usage due to wider words stored in the 16-32-bit cases. RAM is a more precious resource than FLASH, by an (unscientifically determined) factor of 4x-6x.



My completely unscientific conclusion is, that there is little relevant difference between 8-/16-/32-bit platforms, when it comes to real application. There might be biases in either direction in certain applications, and there might be certain applications which simply don't fit into the smaller chips/bitwidths (mainly address bus), or require raw computing power and/or high execution speed. And of course, every application can be further tweaked to save a byte or more.

Other than the extreme cases, there is little reason to move between platforms in either way.

Jan Waclawek


List of 7 messages in thread
TopicAuthorDate
Snake, as a dubious benchmark            01/01/70 00:00      
   especially when ---            01/01/70 00:00      
      mentioned in the "header" of the table            01/01/70 00:00      
   more data            01/01/70 00:00      
      Bit banding?            01/01/70 00:00      
         no            01/01/70 00:00      
            Barrel shifter            01/01/70 00:00      

Back to Subject List