If I may offer some initial thoughts, keeping in mind that I do not know any of the internal details of UltraFractal's runtime system.
If the qualifier 'persistent' (or 'static)' was available for variable declarations, the compiler would be instructed to initialize those variables once, at the beginning of execution, prior to and outside of the Global section.
The Linker would then be instructed to position the persistent variables in a section of memory which would be treated as a persistent block. When computing animation frames, the persistent variables and their contents would be preserved in memory from one frame to the next.
It would be up to the application, in this case, the Transformations, the Fractal Formulas and the Colouring Algorithms, to keep track of what is stored in the Persistent Variables, and how and when to use and modify the data stored in them.
The motivation for this functionality is, as I see it, this: currently, the computational model of UF is powerful and elegant. The animation engine allows for the creation of sequential frames, with a very flexible mechanism to modify computational parameters. The result is very robust. However, the frames in the animation form a set of computational states which are connected via the computational threads of the parameters only. The limitation is that the parameters determine the computational states, but do not constitute them. To access anything in the previous computational state, that state would need to be re-created. Doing so is not only computationally expensive, but, in my opinion, would violate the design principles of UF's runtime computational model. Persistent Variables are a common (and efficient) solution to this limitation.
Thank you for considering this idea.
If I may offer some initial thoughts, keeping in mind that I do not know any of the internal details of UltraFractal's runtime system.
If the qualifier 'persistent' (or 'static)' was available for variable declarations, the compiler would be instructed to initialize those variables once, at the beginning of execution, prior to and outside of the Global section.
The Linker would then be instructed to position the persistent variables in a section of memory which would be treated as a persistent block. When computing animation frames, the persistent variables and their contents would be preserved in memory from one frame to the next.
It would be up to the application, in this case, the Transformations, the Fractal Formulas and the Colouring Algorithms, to keep track of what is stored in the Persistent Variables, and how and when to use and modify the data stored in them.
The motivation for this functionality is, as I see it, this: currently, the computational model of UF is powerful and elegant. The animation engine allows for the creation of sequential frames, with a very flexible mechanism to modify computational parameters. The result is very robust. However, the frames in the animation form a set of computational states which are connected via the computational threads of the parameters only. The limitation is that the parameters determine the computational states, but do not constitute them. To access anything in the previous computational state, that state would need to be re-created. Doing so is not only computationally expensive, but, in my opinion, would violate the design principles of UF's runtime computational model. Persistent Variables are a common (and efficient) solution to this limitation.
Thank you for considering this idea.