patch 9.0.0632: calling a function from an "expr" option has overhead

Problem:    Calling a function from an "expr" option has too much overhead.
Solution:   Add call_simple_func() and use it for 'foldexpr'
diff --git a/runtime/doc/fold.txt b/runtime/doc/fold.txt
index 93efcbb..f11ca08 100644
--- a/runtime/doc/fold.txt
+++ b/runtime/doc/fold.txt
@@ -74,8 +74,6 @@
 of a line.  Examples:
 This will create a fold for all consecutive lines that start with a tab: >
 	:set foldexpr=getline(v:lnum)[0]==\"\\t\"
-This will call a function to compute the fold level: >
-	:set foldexpr=MyFoldLevel(v:lnum)
 This will make a fold out of paragraphs separated by blank lines: >
 	:set foldexpr=getline(v:lnum)=~'^\\s*$'&&getline(v:lnum+1)=~'\\S'?'<1':1
 This does the same: >
@@ -84,6 +82,10 @@
 Note that backslashes must be used to escape characters that ":set" handles
 differently (space, backslash, double quote, etc., see |option-backslash|).
 
+The most efficient is to call a compiled function without arguments: >
+	:set foldexpr=MyFoldLevel()
+The function must use v:lnum.  See |expr-option-function|.
+
 These are the conditions with which the expression is evaluated:
 - The current buffer and window are set for the line.
 - The variable "v:lnum" is set to the line number.
diff --git a/runtime/doc/vim9.txt b/runtime/doc/vim9.txt
index b73011a..15e9a70 100644
--- a/runtime/doc/vim9.txt
+++ b/runtime/doc/vim9.txt
@@ -1410,6 +1410,21 @@
 		'three'
 		]
 
+
+Calling a function in an expr option ~
+							*expr-option-function*
+A few options, such as 'foldexpr', are an expresison that is evaluated to get
+a value.  The evaluation can have quite a bit of overhead.  One way to
+minimize the overhead, and also to keep the option value very simple, is to
+defined a compiled function and set the option to call it without arguments.
+Example: >
+	vim9script
+	def MyFoldFunc(): any
+	   ... compute fold level for line v:lnum
+	   return level
+	enddef
+	set foldexpr=s:MyFoldFunc()
+
 ==============================================================================
 
 4. Types					*vim9-types*