in reply to Re^3: nytprof Profiler gives diverse results
in thread nytprof Profiler gives diverse results

Thanks for the questions!

The loop that is taking all the time is mostly cpu intensive with a decent memory footprint (but no where near my laptop limits)
Its runs a large loop of loops performing string compares, index functions and regex on each element.

I am reasonably sure that the test code is deterministic.
There is some usage of the keys function to order the way we go through the loop,
but on hashes with very few keys and the order of the keys really don't affect anything.

I think my data-point about the effect of opening gmail on a freshely rebooted laptop is the most revealing item.
I've been playing with my power profile, but It doesn't seem to be doing any good... the fan goes up and down throughout the longer tests.

  • Comment on Re^4: nytprof Profiler gives diverse results

Replies are listed 'Best First'.
Re^5: nytprof Profiler gives diverse results
by bliako (Abbot) on Apr 07, 2020 at 12:23 UTC

    In windows it's all a big experiment ... turn wifi off, updates off, email, browsers, a neverending catch-me-if-you-can with the phone-home fairy.

    Anyway, I have no idea on the internals of Perl regexes. It looks like they are the only non-deterministic element in your code, with the hash key search. And, in theory at least, they can contribute that variability in time you observed. Perhaps. It's worth checking min, max and stdev runtime of each of your regexes.