aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc
diff options
context:
space:
mode:
authorJavier Lopez <graulopezjavier@gmail.com>2021-09-10 08:22:40 -0500
committerGitHub <noreply@github.com>2021-09-10 06:22:40 -0700
commit4b452d4efb8cbab48129189833ac8af9a1d02a2f (patch)
tree1d468a2f827e1fe7f86e0f3f0e6cd10bea2b5403 /runtime/doc
parent3b3dbcf7b7ba5466e6ab643e256f2374b520a6b2 (diff)
downloadrneovim-4b452d4efb8cbab48129189833ac8af9a1d02a2f.tar.gz
rneovim-4b452d4efb8cbab48129189833ac8af9a1d02a2f.tar.bz2
rneovim-4b452d4efb8cbab48129189833ac8af9a1d02a2f.zip
perf(lua): optimize vim.deep_equal #15236
By remembering the keys already compared in repeating a comparison is avoided. Thanks: https://stackoverflow.com/a/32660766
Diffstat (limited to 'runtime/doc')
-rw-r--r--runtime/doc/lua.txt12
1 files changed, 11 insertions, 1 deletions
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt
index 3fd3875557..991bab6c9f 100644
--- a/runtime/doc/lua.txt
+++ b/runtime/doc/lua.txt
@@ -1268,7 +1268,17 @@ schedule_wrap({cb}) *vim.schedule_wrap()*
deep_equal({a}, {b}) *vim.deep_equal()*
- TODO: Documentation
+ Deep compare values for equality
+
+ Tables are compared recursively unless they both provide the `eq` methamethod.
+ All other types are compared using the equality `==` operator.
+
+ Parameters: ~
+ {a} first value
+ {b} second value
+
+ Return: ~
+ `true` if values are equals, else `false` .
deepcopy({orig}) *vim.deepcopy()*
Returns a deep copy of the given object. Non-table objects are