http://qs321.pair.com?node_id=1207657


in reply to perl process slower and slower when loop number increase

Running the tests like that mixes in the results of startup time with loop time. Use a real benchmark module to time the actual code, and time per iteration. If you want to count the startup time, do that too, with a loop around multiple startups.

There are probably other issues with this. Get some benchmarking wisdom to make sure you're not doing something awful.

But the killer is, You're not doing anything productive, just counting useless loops -- so all of the time is wasted on bookkeeping!

-QM
--
Quantum Mechanics: The dreams stuff is made of