in reply to My program drags and then runs fast. Why?
Thanks for everyone's suggestions. At least I have some ideas now of why my loops might speed up. Now I think that in this particular situation the slow-down is somehow in the C library, and not Perl's or Inline's fault. I am now re-implementing it in pure Perl---I think this will be faster for me than figure out what's going wrong in C.