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

💡 "Compiling" workflows or macros #129

Open
liamhuber opened this issue Dec 10, 2023 · 0 comments
Open

💡 "Compiling" workflows or macros #129

liamhuber opened this issue Dec 10, 2023 · 0 comments
Labels
wontfix This will not be worked on

Comments

@liamhuber
Copy link
Member

There is some overhead to using the node structure for things, with the benefit of flexibility, breakpoints, reusing nodes in different contexts, parallelization, etc. But what if you have a workflow/macro that you're simply really happy with and want it to run as effectively as possible?

We now provide direct access to Function nodes' node_function method as a class property; in principle it should be possible to recursively "compile" macros so that instead of building nodes, they're just a function that leverages their childrens' node_function and completely hard wires how the IO gets passed between them. I.e. turn the thing into a single big python function. You would lose basically all the benefits, but gain speed from ditching the node communication.

In some cases it might be possible to go a step further and Cython the whole thing at the end to crank out even more speed.

Right now this is still a distant dream, but it's a possible goal to keep in mind.

@liamhuber liamhuber added the wontfix This will not be worked on label Dec 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant