-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
[Efficiency] Use ES6 Map()/Set() in lieu of Object where possible #1070
Comments
Need to survey where else conversion to Set/Map is possible. |
https://jsperf.com/ is down, so there is a custom benchmark now: https://gorhill.github.io/obj-vs-set-vs-map/. |
At the same time, the following issues were fixed: - #1954: automatically lookup site-specific scriptlets - uBlockOrigin/uAssets#23
@gorhill Thank you very much for doing that. First of all it is great to have an efficient blocker and at the same time an open development. The benchmark for Set/Map was interesting, I'm gonna use it as well. |
Also, in case anyone ports this to Safari: 9+ supports |
Benchmarks:
For instances in the code where no iteration through the set is needed, we can use a shim for versions of Chromium older than 38 -- Firefox supports ES6 Set() since FF 13.
Because
for...of
is supported only for Chromium 38+, for instances in the code where iterations through the set is needed, this will have to wait for longer term. Possibly a v2.0 of uBO will be incompatible with Chromium version 37 and older.The text was updated successfully, but these errors were encountered: