-
Notifications
You must be signed in to change notification settings - Fork 9
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
Handle memo for function declarations / function assignments [publish] #45
Handle memo for function declarations / function assignments [publish] #45
Conversation
Well JS perf is not as simple. For a long time for small sets it was faster to use arrays than Set, because they have been in the engine for a long time and more optimized. This seems to not be true anymore on V8, and the opposite on JSC where array seems unoptimized. perf link Sadly set creation is still not optimized enough compare to array creation, so sets should not be created when use only a few times: perf link Given the current status of engines, I think your change is good expect for the creation of For the feature side, I think we don't need to check that deep, something that looks like |
I can do
Hmmm, that makes sense. |
Thanks for the PR, this is published in v0.4.9! |
Fixes #44
cc @ArnaudBarre
The PR also slightly improves matching performance by replacing
Array#includes
w/Set#has
(where the previous one isO(n)
while the latter one isO(1)
).