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

assert.same has poor performance and only compares depth of back references #182

Open
appgurueu opened this issue May 29, 2022 · 0 comments

Comments

@appgurueu
Copy link

More performant implementation that checks whether a reference mapping exists: https://github.com/minetest/minetest/blob/36c8e5a7f18d7254d9f8991cbc8cd5dd36c5f577/builtin/common/tests/serialize_spec.lua#L9-L37

Perhaps this should be added as a new assertion in order to not break backwards compat; either way my fuzzing seems to reveal that for complex circular structures assert.same has very poor (presumably exponentially poor) performance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant