I wrote:

> Patch 9.0.0632
> Problem:    Calling a function from an "expr" option has too much overhead.
> Solution:   Add call_simple_func() and use it for 'foldexpr'
> Files:      runtime/doc/fold.txt, runtime/doc/vim9.txt, src/userfunc.c,
>             src/proto/userfunc.pro, src/eval.c, src/vim9execute.c,
>             src/testdir/test_fold.vim

I looked into compiling an "expr" option into instructions to make it
fast, but setting up the context, checking arguments, sandbox, etc. all
makes this quite complicated.

So I thought of this simple solution of calling a function directly.
This at least skips quite a few function calls (about twelve levels
deep) without changing how things work.

If this works well we can use it for several other options.
Let us know.

-- 
hundred-and-one symptoms of being an internet addict:
242. You turn down a better-paying job because it doesn't come with
     a free e-mail account.

 /// 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/20221001145406.B428E1C065C%40moolenaar.net.

Raspunde prin e-mail lui