Greetings,

On Sun, 14 Mar 2010 18:29:09 -0700 (PDT), mattschinkel wrote
> Can someone comment on ram speed vs program data speed?
> 
> I don't remember much about workings of microcontrollers from back in
> school, but I think it needs to "switch banks" or something like that
> to read program data? I have read online that the best place for it 
> is ram.
> 
> As stated, a user constant could be useful. I know lookup tables
> consume much data space.

Speed: a constant array lookup requires 9 clocks; a variable array lookup
requires 5 clocks. Note that this assumes the variable array fits in a single
bank which would not be true for a 256 entry array except on the 16 bit cores.
Adding the split bank logic will require far more than 9 cycles.

Memory: a constant array takes up roughly 1/2 the program memory as a variable
array, and requires zero data space.

Finally, this smacks of pre-mature optimization. Unless you *know* the
bottleneck is in the CRC routine, it's rather silly to spend any time
optimizing it.

--kyle

-- 
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en.

Reply via email to