September 12th, 2006, 01:29 AM
Memory Conservation vs. Execution Speed
I have a question regarding programming in general. I'm writing programs for a Stamp 2 microcontroller using PBASIC. The unit I'm working with has 20 MHz processing speed, 26 bytes worth of variable RAM, and 2kB EEPROM. Within this hardware constraints I'm trying to decide whether it's more effecient (not in regards to my time) to write code that utilizes all the available memory or if it's better to utilize the processor more by implementing psuedo-compression (ie. instead of using a 8 byte variable, use a 4 byte and multiply it by a 2 byte variable when you use the number).
I'm hoping someone with a bit more programming experience would be willing to give me counsel.