Open appgurueu opened 2 years ago
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.
assert.same
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.