-
Notifications
You must be signed in to change notification settings - Fork 385
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 original map for data backing when possible. #429
Conversation
Thanks! What about browsers where In other words, using the original Map is a great approach, but there are a fractal of issues caused by the very necessity of the shim in the first place :-/ |
I was hoping that was handled by the fast path.
Do you have a unit test to cover this?
I'm not using
This doesn't affect our internal map use.
Ya, I'll address that. |
I have a number of test cases that should cover it - you'd need to run the test HTML in a very large number of browsers (which sadly travis doesn't cover) to check it out. Mind you I'm not saying all these things will definitely cause a problem - more that it's possible, and I want to both be confident in this PR's correctness and also avoid leaving behind a footgun for the future. |
Cool. Ya, the use case I'm going for is to be a replacement for the linear search for object keys. That means it just needs to be a black box that is a yay or nay for if an object key is found. It can even go along with the array tracking as just a faster check but defer to the linear backing for when order is important. |
Looks like unit tests pass in IE11 and it resolves the perf issue 🎉 |
Thanks, I'll give it a thorough review, and do some extensive testing in as many browsers as I can before merging this. |
Tested on Safari 7, 8, 9, 10 and IE 9, 10 with no |
TC39 is this week so I'll need a bit more time to review; rest assured it's still on my list :-) |
Thanks! |
This PR attempts to address #422 by using the original map for data backing when possible to avoid linear lookups.