Ernie Rael wrote:
> On 23/03/20 10:56 PM, Ernie Rael wrote:
> > It is the profiling itself that is causing the results to be so skewed as
> > things run longer. I guess the thing to do now is use the linux/gnu
> > profiler to profile the vim profiler.
>
> Found it.
>
> Doing
> execute 'profile func' funcref(Func)->get('name')
> profile start xxx.profile.out
> generates
> Error detected while processing command line..script
> /home/err/play/xxx.vim:
> line 15:
> E750: First use ":profile start {fname}"
> I assumed (bad programmer) that the list of functions to profile is
> cleared by `profile stop`; after all you can't set the functions
> without doing `profile start`.
>
> So I've been doing
> profile start xxx.profile.out
> execute 'profile func' funcref(Func)->get('name')
> Func()
> profile stop
> and this gets done multiple times while collecting data.
You can do "profdel *" somewhere.
> Here's some gprof output
> % cumulative self self total
> time seconds seconds calls ms/call ms/call name
> 31.82 0.07 0.07 542508 0.00 0.00 nfa_regmatch
> Without a function name being set multiple times nfa_regmatch
> is at most a blip. BTW, the name looks like `<SNR>47_T`.
>
> This profiling behavior is confusing at best.
>
> Throwing out duplicate patters is a thought.
These normally don't happen. I doubt it will help much in general.
> I wonder if `function name {pattern}` that don't require regexp
> could/should be handled without it; maybe a table lookup.
Possibly, but is it worth it? As with caching, this often is tricky to
get right.
--
Yah, well, we had to carve our electrons out of driftwood we'd
find. In the winter. Uphill. Both ways.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" 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_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/20230322220232.AA11D1C07BD%40moolenaar.net.