Object Test 3: Pairing a dynamic and static value - [pack], [pak], or [append]

    Sep 10 2015 | 12:20 pm
    Disclaimer: This test only covers a very small paradigm of usage, and simply testing the speeds of these processes using particular objects. The efficiency of each object setup can change dramatically when, for instance, adding a 3rd value to the array. The test download is available on my site. If you want to check it out or add to it, please feel free to post here.
    The Test Often I want to pair a dynamic value to a static value. But I've wonder which method is the most computationally efficient. I see a lot of people using [pak], but which method is actually fastest? [pak], [pack], or [prepend]/[append]?
    Check out my blog post for more details and a link to download the patch:Max/MSP Test 03 :: [pack] vs [pak] vs [prepend]
    Some take-aways from this test:
    • If you need to pair a dynamic value with a static value, use [prepend] or [append]. Put simply, they're faster in this particular case.
    • The left input on a [pak] is way faster than the right inlet. But it's still faster than using [t b i] into a [pack i i] if you're trying to append something, but still slower than an actual [append] object.
    • When joining two dynamic inputs, whether using a single [pak] or a [t b i] into [pack], the speed difference is minute, but [pak] is possibly more convenient patching-wise.
    Let me know your thoughts.

    • Sep 11 2015 | 5:06 pm
      How about testing with a message box ["your message here" $1]? I remember reading about a 'message lookup penalty' (or some such), so suspect it'd be slower than the others.
    • Sep 11 2015 | 5:25 pm
      This is comforting to hear, so thanks. FWIW, and based on no hard evidence, I have a preference for pak and append/prepend anyway