I am doing numerical calculations with a For loop of 2000 cycles. In each cycle, there are hundreds of floating point calculations. If I set the number of cycles to 100, it takes about 4 sec to finish. However, when the number of cycles is 2000, the code goes fast for the first about 400 cycles but then slows down badly. The total calculation takes about 12 min = 720 sec. But the expected time is about 4 x 20 = 80 sec. I have never seen this before. Can anyone give me some hints? Thanks.
H.H.