When writing records to a direct access file I am finding that the Intel Fortran compiler is much slower than my 17 year old Watcom Fortran compiler running exactly the same code. In fact the Intel compiler is around 10 times slower!! This doesn't seem right to me. Can anyone see what I am doing wrong in the code segment below? Note that if CASES=1970 and BMS=5167, it is writing over 10 million records and this is taking around 8 minutes on my I7 laptop, whereas the ancient Watcom compiler does it in less than a minute.
You can see that I have a PeekMessage statement in the loop so that it can process Windows messages, however I am finding that the speed is the same with or without it.
RECORD /MACTIONS/ MACT(BMS,CASES)
WRITE (MALUN,REC=RCD,IOSTAT=IO) NMP