On 23/03/24 10:45 AM, Bram Moolenaar wrote:
You might want to store the hash number with the function to avoid the
overhead of computing it.
This still needs to be done. To make sure I understand,
this is saving `hash_hash(name)` in ufunc_T and has_profiling has an
additional argument which is the hash. And if this argument is zero
then the hash would be computed in has_profiling.
I haven't looked at the PR yet, but I would think that as soon as you
have the function pointer, you can use the field that has the hash
value.  It is based on the function name, which doesn't change.  Thus it
needs to be computed only once.
Right, that's what I meant . After thinking about it a bit more, I went ahead and implemented something, and pushed it last night, as you'll see. Caching the hash
is an easily detected improvement.

-ernie


However, if you mean the hash value of the pattern, then it would be
stored in "struct debuggy".  Obviously it depends on what key you use
for the hash table.


--
--
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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/af7cbe90-fcbf-83ec-1a70-fe58dc9c076a%40raelity.com.

Raspunde prin e-mail lui