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
Implementation recommendations #14
Comments
"a parallel array" means |
I was referring to converting the set into an array at the end rather than building an array alongside the set. |
@isiahmeadows Not sure whether they would have perf difference... |
It may, considering CPU pipelines and such - with a specialized data structure, it becomes effectively just a copy, and CPUs like that. They can also allocate only the memory needed for the returned result in one single step as opposed to potentially multiple allocations in the loop, thus wasting less memory and reducing the overhead in the loop itself. |
It may also slower, especially in embed js engines. :-P |
Part of why I said "should consider" and not that it's an outright recommendation like using hash tables for |
This is more an FYI than a specific feature request. For ideal performance, implementations should consider the following:
Array.from(set)
rather than a parallel array.The text was updated successfully, but these errors were encountered: