in reply to My program drags and then runs fast. Why?
Many. You don't give us much to go on. Caching at some level is most likely - the first 20% builds the cache and the remainder gains the benefit.
It should be fairly trivial to slow the fast bit down by checking loop iteration time and putting sleeps in as required.
|
|---|