Announcement

Collapse
No announcement yet.

Nodes Evaluation and Optimizations

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Nodes Evaluation and Optimizations

    Hello everyone,

    I have a small question about how the Visual Scripting tool works, and more precisely about how smart does it translate our graphs into code, and even more precisely, is it smart enough to understand that sometimes, it can store some results to use them later instead of recomputing them.

    I have this example :

    Click image for larger version

Name:	Sans-titre.png
Views:	1
Size:	61.3 KB
ID:	1631083

    My question focuses on the operation Index*6.
    In any imperative programming language, I would have stored the result of this operation in an automatic variable called something like "currentSourceIndex" and re-used it to do the same for every "currentSourceIndex+1", "currentSourceIndex+2" and "currentSourceIndex+3" operations. The idea is to avoid recomputing "Index * 6" several times unnecessarily.

    So, is the Visual Scripting tool smart enough to understand this kind of things, or will it simply browse the graph from the Make Array node to the ForLoop node, and construct the formulas anew for each of its input pins, resulting in computing "Index*6" several times (between other things) ?

    I need to understand this kind of subtleties, so I hope someone has the answer or some links to the documentations clarifying this kind of topics, which I couldn't find on my own.

    Thanks in advance !

    #2
    Blueprints are dumb

    Comment


      #3
      Click image for larger version

Name:	images.jpg
Views:	1
Size:	73.7 KB
ID:	1631143
      | Finite State Machine | Auto-Save Plugin | USQLite Plugin | Object-Pool | Sound-Occlusion | Property Transfer Tool | Magic Nodes | Magic Nodes | Persistent Materials |

      Comment


        #4
        OK seems like I have my answer x)

        Comment

        Working...
        X