Thursday, May 17, 2018

Re: Help on Interpreting profiles (while loop vs recursive function)

On 16/05/2018 21:09, Lifepillar wrote:
> I wanted to profile the performance of a while loop vs a recursive
> function, so I wrote two functions, Iter() and Rec(), computing the
> same value (full code at the end of the message).
>
> The execution took ~4s, but Rec()'s measured times were (full profile
> at the end of the message):
>
> FUNCTION  Rec()
> Called 319100 times
> Total time:  55.655449
>  Self time:   0.100880
>
> count  total (s)   self (s)
> 319100              1.070460   return etc...
>
> So, the total time looks wildly wrong. Am I missing something?

Well, I missed this from `:help profiling`:

- The "self" time is wrong when a function is used recursively.

So, I guess that none of the numbers above is reliable?

Life.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment