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

Use ArrayIterator instead of RecursiveArrayIterator for array input #37

Merged
merged 1 commit into from
Apr 24, 2017

Conversation

jdreesen
Copy link
Contributor

This PR is regarding my comment in #36 (comment).

I don't see a value in using an RecursiveArrayIterator instead of a simple ArrayIterator for array input: We don't use the additional {get|has}Children() methods and don't use it in combination with a RecursiveIteratorIterator for flat iteration over a multi-dimensional array.
Thus I think it's safe to replace it. The tests pass and performance seems to be roughly the same (the timings differ a bit if I run the performance script multiple time on my pc so I'm not sure what the exact difference is; maybe you have a more reliable way to test this?).

@DusanKasan
Copy link
Owner

Looks good. Thank you for the contribution.

@DusanKasan DusanKasan merged commit cc29a0b into DusanKasan:master Apr 24, 2017
@jdreesen jdreesen deleted the simple-array-iterator branch April 25, 2017 05:36
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

Successfully merging this pull request may close these issues.

2 participants