Use ArrayIterator instead of RecursiveArrayIterator for array input #37
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is regarding my comment in #36 (comment).
I don't see a value in using an
RecursiveArrayIterator
instead of a simpleArrayIterator
forarray
input: We don't use the additional{get|has}Children()
methods and don't use it in combination with aRecursiveIteratorIterator
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?).