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
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: perl process slower and slower when loop number increase
by karlgoethebier (Abbot) on Jan 22, 2018 at 16:02 UTC | |
Re^2: perl process slower and slower when loop number increase
by Anonymous Monk on Jan 22, 2018 at 12:05 UTC | |
by Dallaylaen (Chaplain) on Jan 22, 2018 at 15:59 UTC |
In Section
Seekers of Perl Wisdom