From ef1801cc7c3d8fe9fd8524a3b677095d4437fc66 Mon Sep 17 00:00:00 2001 From: Gregory Anders Date: Fri, 28 Apr 2023 11:37:53 -0600 Subject: 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. --- runtime/doc/lua.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/doc') 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 -- cgit