- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Does the use of allocate affect the speed of the program, compared to using static alloated matrices?
Link kopiert
2 Antworten
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
It can, but a lot will depend on the program. Many programs won't see a difference. The major issue is what information the compiler can see about the bounds of the array, and where it has to get it from. We've done a lot of work to optimize this, so I would not hesitate to use allocatable arrays where they make sense.
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
It will affect some types of coding practices but not others. Many large-ish applications have dozens or hundreds of program modules. These modules are typicaly passed references to an array or to a portion of an array.
The call may suffer a tiny hit but if the subroutine performs a lot of work then it is dereferencing the dummy argument and these should work as fast as they did before (unless DIMENSION'ed with (*)).
Jim Dempsey
Antworten
Themen-Optionen
- RSS-Feed abonnieren
- Thema als neu kennzeichnen
- Thema als gelesen kennzeichnen
- Diesen Thema für aktuellen Benutzer floaten
- Lesezeichen
- Abonnieren
- Drucker-Anzeigeseite