Re: efficiency change by dynamic allocation in microprocessor
- From: "db" <dbahlmann@xxxxxxxxx>
- Date: 29 Aug 2005 23:41:28 -0700
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
.
- References:
- efficiency change by dynamic allocation in microprocessor
- From: dungglee
- efficiency change by dynamic allocation in microprocessor
- Prev by Date: Re: Floating point calculations on 16 uC
- Next by Date: Re: Using AD7890
- Previous by thread: efficiency change by dynamic allocation in microprocessor
- Next by thread: Re: efficiency change by dynamic allocation in microprocessor
- Index(es):