- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We are using
IA-32, Version 11.0 Build 20081105.
Today I noticed an important optimisation you appear to have missed:
CHARACTER*256 ,ALLOCATABLE :: bigarray(:)
CHARACTER*256 last_entry
INTEGER*4 ix,found
...
found = 1
DO WHILE (.TRUE.)
ix = ix + 1
IF (bigarray(ix) < last_entry) CYCLE
IF (bigarray(ix) ==last_entry EXIT
found = 0
EXIT
ENDDO
The issue is that the compiler does not treat this as a special case common subexpression and two calls to
_for_cpstr are generated.
Regards
Peter Smith
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'll pass that suggestion on to the developers - thanks.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page