diff options
author | Gregory Anders <greg@gpanders.com> | 2023-04-28 11:37:53 -0600 |
---|---|---|
committer | Gregory Anders <greg@gpanders.com> | 2023-04-28 15:38:50 -0600 |
commit | ef1801cc7c3d8fe9fd8524a3b677095d4437fc66 (patch) | |
tree | 7b7798ca68ac49c38c50899bd625d062e31c35a0 /runtime/doc/lua.txt | |
parent | 5a0250c9a74ea400c4e21f70ed71c3dd1e2386e4 (diff) | |
download | rneovim-ef1801cc7c3d8fe9fd8524a3b677095d4437fc66.tar.gz rneovim-ef1801cc7c3d8fe9fd8524a3b677095d4437fc66.tar.bz2 rneovim-ef1801cc7c3d8fe9fd8524a3b677095d4437fc66.zip |
perf(iter): reduce number of table allocations
Packing and unpacking return values impairs performance considerably.
In an attempt to avoid creating tables as much as possible we can
instead pass return values between functions (which does not require
knowing the number of values a function might return). This makes the
code more complex, but improves benchmark numbers non-trivially.
Diffstat (limited to 'runtime/doc/lua.txt')
-rw-r--r-- | runtime/doc/lua.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index b3be11efdb..e36ff9d8d8 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -3080,7 +3080,7 @@ Iter:map({self}, {f}) *Iter:map()* • {f} function(...):any Mapping function. Takes all values returned from the previous stage in the pipeline as arguments and returns one or more new values, which are used in the next pipeline - stage. Nil return values returned are filtered from the output. + stage. Nil return values are filtered from the output. Return: ~ Iter |