Re: deepening into fortran 90,95, 2003



glen herrmannsfeldt wrote:
Richard Maine wrote:

glen herrmannsfeldt <gah@xxxxxxxxxxxxxxxx> wrote:


[discussion of code optimization]


I disagree that it is useful at all for most people to look at generated
code. I haven't done so myself for ages. I particularly think it not
useful for relative novices such as the OP.


I agree for 'most' people. It is, though, fairly easy to
write Fortran that is much slower than it could be. Factors
of two easily, and even much larger factors.

I've been bitten many times by the slowness of concatenation of strings. In order to populate RTF fields, you sometimes need to build up an extremely long string from smaller chunks. Concatenation seemed the most obvious (naive) solution to me. But it was excrutiatingly, noticeably slow. Changing it to direct indexing was a huge speedup.

<snip> (see I snipped this time!!)

--

Gary Scott
mailto:garylscott@sbcglobal dot net

Fortran Library: http://www.fortranlib.com

Support the Original G95 Project: http://www.g95.org
-OR-
Support the GNU GFortran Project: http://gcc.gnu.org/fortran/index.html

If you want to do the impossible, don't hire an expert because he knows it can't be done.

-- Henry Ford
.



Relevant Pages

  • Re: Integer Coersion
    ... For my applications, this type of capability flows naturally into a bit string datatype (building new, possibly composite types from bit strings). ... Convert doesn't support 11-bit integers. ... Perfect for automation by the compiler. ... Support the Original G95 Project: http://www.g95.org ...
    (comp.lang.fortran)
  • Re: Object RExx class serialization
    ... helpfull class to store objects persistently as strings. ... only the first line of the test.cmd file needs to be modified. ... Support the Original G95 Project: http://www.g95.org ... Support the GNU GFortran Project: http://gcc.gnu.org/fortran/index.html ...
    (comp.lang.rexx)
  • Re: Passing Strings from C#
    ... but strings are sent as garbage. ... _laminaElasticConstant, ... Support the Original G95 Project: http://www.g95.org ... Support the GNU GFortran Project: http://gcc.gnu.org/fortran/index.html ...
    (comp.lang.fortran)
  • Re: The linf project (2)
    ... strings and arrays are *VERY* similar. ... those I/O properties are and then require the language to achieve ... Support the Original G95 Project: http://www.g95.org ... Support the GNU GFortran Project: http://gcc.gnu.org/fortran/index.html ...
    (comp.lang.fortran)
  • Re: SYS$LANGUAGE
    ... Neil Rieck wrote: ... I'm currently adding French support to some programs originally written in ... load the desired language strings into an array before the program runs. ...
    (comp.os.vms)