forked from JuliaLang/julia
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve precision of abstract_iteration (JuliaLang#36524)
Currently abstract iteration works fine for length-1 iterators, but fails over for other small length iterators, such as Pair{Int, Int}, or common patterns where `iterate` iterates over the fields of a small struct. Other examples include StaticVectors and constant iterators, which should all now unroll properly up to the MAX_TUPLE_SPLAT limit. That said, MAX_TUPLE_SPLAT is quite high at the moment, but because abstract_iteration isn't very precise, it's unlikely to be limiting. With this increase in precision, we may find that MAX_TUPLE_SPLAT is too high and we should lower it. Also note that while this is a nice improvement, performance is still not great, since we currently can't inline these apply calls. However, fixing that is in progress in a parallel PR and with both changes put together, the performance improvement of splatting of small iterators is quite sizeable.
- Loading branch information
Showing
2 changed files
with
32 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters