We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
As per the README
Astute readers may object that some bookkeeping data remains in memory when you create tuple objects with prefixes of primitive values
This can be solved by 'hoisting' the object parts of the key to the front before performing the lookup. i.e.:
Tuple(1, 2, Object); Tuple(1, Object, 2);
can interally lookup the tuples for:
[Object, 1, 2, Object] [Object, 1, Object, 2]
This does make the lookup O(2n), but that is still O(n).
O(2n)
O(n)
Note: this also doesn't only apply to objects, now that https://github.com/tc39/proposal-symbols-as-weakmap-keys is part of the spec, non-registered symbols can also be 'hoisted' to the start of the key too.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
As per the README
This can be solved by 'hoisting' the object parts of the key to the front before performing the lookup. i.e.:
can interally lookup the tuples for:
This does make the lookup
O(2n)
, but that is stillO(n)
.Note: this also doesn't only apply to objects, now that https://github.com/tc39/proposal-symbols-as-weakmap-keys is part of the spec, non-registered symbols can also be 'hoisted' to the start of the key too.
The text was updated successfully, but these errors were encountered: