You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This code uses lualib sparse arrays, even though there shouldn't be any need to, since arrays with nulls are not supported anyway. This might have a considerable impact on performance in hot loops.
The text was updated successfully, but these errors were encountered:
While this will functionally work and result in the correct result, there are two issues with this:
Like you said, the performance of this is questionable, there is not really a reason to use the expensive parse array push when a regular array push would do.
We are making an extra copy of array in your example. It is already loading the result into a temporary array to do the array pushes on, but then once it's done we unpack and put it indo another array literal again, which is not required
https://typescripttolua.github.io/play#code/NoOjwXQGgAjFISA
This code uses lualib sparse arrays, even though there shouldn't be any need to, since arrays with nulls are not supported anyway. This might have a considerable impact on performance in hot loops.
The text was updated successfully, but these errors were encountered: