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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/19/08 03:06
Read: times


 
#156028 - maybe ok....
Responding to: ???'s previous message
Firstly, try whatever works then go on from there! As for the memory consumption of a 2d array, in your instance its only a few bytes for the array data and the compiler may decide to optimise the access to it rather than use multiplies etc. You could use a switch statement, but that would probably chew up as many if not more bytes than using an array. Using an array makes sense when you have a non-linear mapping from input to output - FPGAs use fast ram lookup tables to implement their logic!

If in doubt of the amount of memory required in a certain instance - write some test code and look at the results and your question will be answered with hard evidence.

List of 2 messages in thread
TopicAuthorDate
Is this a good approach using a 2D array for this?            01/01/70 00:00      
   maybe ok....            01/01/70 00:00      

Back to Subject List