in reply to Re: "my" cost
in thread "my" cost

Is 0.00722599029541 seconds really a long time?

It is if you need to iterate through the loop enough times!

However, I don't concern myself with how long things take until they take "too long". At that point, I look to see why they are taking so long and what we can do about it.

Replies are listed 'Best First'.
Re^3: "my" cost
by ikegami (Patriarch) on Aug 19, 2024 at 04:21 UTC

    It is if you need to iterate through the loop enough times!

    How do you figure that?

    If you're going to loop a million times, it's still only takes 0.0007 s cumulatively. It will only add up to 7 s if you do a billion passes of the loop. If you're doing something a billion times in Perl, it's going to take an hour, a day, or more. An extra 7 s isn't going to matter. This is the point where you offload the work to C or something, not move a my.