Python Tips'N'Tricks #5
“Python Tips'N'Tricks #5” is a project built with TouchDesigner, featured in the Derivative community showcase in 2022.
Cache Sometimes, you have some heavy calculations done in a function, like using a getattr method or doing a deep-search for operators. If you know that the result of this function will not change after the initital call, you might be tempted to store the result in a global variable and call it a day.
Programme information from Derivative (TouchDesigner) Community. Short excerpt quoted for reference; see the original page for full text, images and credits.