Patch Optimisation

    Apr 22 2021 | 12:36 am
    How do you proceed when it comes to optimize your patch or reduce the CPU consomption ? What are the golden rules ? I would like to be able to check and optimize my patches myself, so if you got tips I take everything ! Thanks !

    • May 02 2021 | 10:20 pm
      No one ? :/
    • May 02 2021 | 10:28 pm
      there are several threads here about that topic, but i dont remember a working search term.
    • May 03 2021 | 1:47 am
      SAPO, try searching here using both the British and North American spellings of "optimize".
      I'm not the right person to dispense sage advice on this topic, but things I've noticed in patches of my own creation that have made a measurable difference:
      1. Don't use floating point calculations where an integer will suffice. I've only seen a real benefit from this in one patch that fed the same number to dozens of different calculations thousands of times per second, but switching to integers made a difference in that one instance. I still use floats where they are necessary or just more practical.
      2. Creating a hierarchical structure within your dict (dicts within dicts) is great for readability/organization, but it'll slow read/write access to that dict after like 10 or more are nested in there... at least in my experience. I don't try so hard to keep my dicts beautiful anymore.
      Some threads that may help, depending on the nature of your Max creation:
    • May 03 2021 | 5:21 pm
      Thanks a lot Patrick !