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

improve performance for size check for native types #121

Closed
justinbmeyer opened this issue Jun 19, 2018 · 2 comments
Closed

improve performance for size check for native types #121

justinbmeyer opened this issue Jun 19, 2018 · 2 comments

Comments

@justinbmeyer
Copy link
Contributor

Currently, if we do .size(array) it loops through every item in the array. This is really slow. I'm going to change it so arrays are special cased. We might want to add symbols or other special casing for Map, Set, etc.

Finally, we might want a .isEmpty() method which is often what .size() really wants. This would only need to loop through the first item and exit. Of course, we don't have a way of early exiting currently.

@justinbmeyer
Copy link
Contributor Author

actually, it should have already been fast-pathed for array. There was a bug ...

@justinbmeyer
Copy link
Contributor Author

Closed by: ac267ba

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

No branches or pull requests

1 participant