Re: efficiency change by dynamic allocation in microprocessor



dungglee wrote:
>>Hi,

>>I should make scientific program which use linea alebra with so many
>>matrixs.
>>I would like to know whether it is good to make matrix class using dynamic
>>memory allocation (new/delete or malloc/free) or using two-D arrays with
>>fixed (big enough)size?

If you know the size of your arrays, use the stack. Dynamic memory uses
the heap and it will have a performance impact both in memory
allocation time and data access time. Only use dynamic memory
allocation if you have a good reason for using it.
Regards
db

.