Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conditionally define table.empty and table.getsize in Lua #6537

Merged
merged 2 commits into from
Nov 16, 2024

Conversation

Garanas
Copy link
Member

@Garanas Garanas commented Nov 16, 2024

Description of the proposed changes

Removes the Lua definitions of table.empty and table.getsize. These are now defined in the engine for better performance.

Requires:

Checklist

  • Changes are annotated, including comments where useful
  • Changes are documented in the changelog for the next game version

@Garanas
Copy link
Member Author

Garanas commented Nov 16, 2024

@4z0t if I am not mistaken then you also did a deepcopy implementation in C/C++. Is that functionally equivalent to the Lua version?

@4z0t
Copy link
Member

4z0t commented Nov 16, 2024

No, there are differences. My implementation doesn't care about metatables

@4z0t
Copy link
Member

4z0t commented Nov 16, 2024

Plus It requires a lot of changes for this PR.

@Garanas
Copy link
Member Author

Garanas commented Nov 16, 2024

No, there are differences. My implementation doesn't care about metatables

That sounds problematic yes, with the number of brain/unit references all over.

@Garanas Garanas marked this pull request as ready for review November 16, 2024 21:09
@Garanas Garanas merged commit fd11eae into develop Nov 16, 2024
1 check passed
@Garanas Garanas deleted the performance/table-operations branch November 16, 2024 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants