Re: Speed penalty for using allocatable arrays?



Walter Spector <w6ws_xthisoutx@xxxxxxxxxxxxx> wrote:

jomarbueyes@xxxxxxxxxxx wrote:
... I noticed that the
version
of the program that allocates the large arrays we use runs at a much
slower speed compared to the version of the same program that uses
static allocation...

Are you using POINTERs or are you using ALLOCATABLEs?

Plus a bunch of other similar questions to tie down whether the problem
has been misidentified in describing it as coming from allocatable
arrays. Is that absolutely the only change in the program, or did other
things, which you might think irrelevant, also change?

For example, did you change dummy arrays to assumed shape?

--
Richard Maine | Good judgement comes from experience;
email: last name at domain . net | experience comes from bad judgement.
domain: summertriangle | -- Mark Twain
.



Relevant Pages

  • Re: Destructor that implies another destructor call (using new/delete)
    ... and X also internally allocates a few simple arrays ... The power and elegance of STL classes will do proper cleanup of both the pointed objects and the vector storing the pointers automatically. ... int * GetArray1 ...
    (microsoft.public.vc.language)
  • Re: Destructor that implies another destructor call (using new/delete)
    ...  and X also internally allocates a few simple arrays ... there is no need to explicitly delete the arrays allocated with ... the assignment you have: ... what does it mean to 'ban class copy' etc by using this explicit ...
    (microsoft.public.vc.language)
  • Re: Allocatable versus automatic arrays
    ... but some of these arrays are only used conditionally.... ... it allocates a large chunk of memory ... this will make any difference in speed or memory management after the ... There can be more cost to declaring static arrays, ...
    (comp.lang.fortran)
  • Re: Small Variant Records in C
    ... allocates a minimal number of bits (rounded of by a word size I ... the current problem is that I allocate *cough* 15M chars. ... to the 64 bits cell size for the collector. ... (And I don't know how you do arrays, but if you want arrays with mixed ...
    (comp.lang.c)
  • Re: Allocatable versus automatic arrays
    ... but some of these arrays are only used conditionally.... ... it allocates a large chunk of memory ... this will make any difference in speed or memory management after the ... There can be more cost to declaring static arrays, ...
    (comp.lang.fortran)