Skip to content

getall: cleaner, support Recursive #98

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

aplavin
Copy link
Member

@aplavin aplavin commented Apr 2, 2023

Here, I try out a different getall implementation based on the trick from FluxML/Functors.jl#61.
It:

The getall limit for ComposedFunction inference seems to become lower than before, though. It affects one test that tested the maximal depth of 10.
Well, the getall(ComposedFunction) implementation may stay as before with @eval, only adding Recursive from this PR...

@jw3126 @rafaqz @cscherrer

@bgroenks96
Copy link

Hey @aplavin what happened with this PR? Is there something blocking it?

@aplavin
Copy link
Member Author

aplavin commented Jun 24, 2025

For reducing code generation (@eval) in getall: there's no pressing need to do that, and apparently the compiler still cannot optimize it in all cases:

The getall limit for ComposedFunction inference seems to become lower than before, though. It affects one test that tested the maximal depth of 10.


For adding Recursive support: it can be done I guess, but is it needed? Anyone using Recursive at all?
IME, it's quite hard to use in practice; I can recommend RecursiveOfType from AccessorsExtra.jl instead.

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