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

Use native Set and Map #13

Open
jehon opened this issue May 25, 2020 · 3 comments
Open

Use native Set and Map #13

jehon opened this issue May 25, 2020 · 3 comments
Labels
idea/proposal Sharing an idea/proposal

Comments

@jehon
Copy link
Contributor

jehon commented May 25, 2020

What about using Set for subscriber list, and Map for key => ... ?

@BrodaNoel
Copy link
Owner

I'm not against it, just tell me about the benefits.

Considering that duix has a really small code, and super simple, I kind of ignore performance benefits. But, if there are are other benefits, I could consider it.

@BrodaNoel BrodaNoel added the idea/proposal Sharing an idea/proposal label May 25, 2020
@BrodaNoel
Copy link
Owner

Here #5 someone already talked about adding Set and Map.

@jehon
Copy link
Contributor Author

jehon commented Jun 1, 2020

More than Set and Map, a WeakMap would be good to have a "weak" pointer to the element.
Or waiting for weakReferences to be supported everywhere?

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

No branches or pull requests

2 participants