Trigger vs. int


    Feb 19 2006 | 6:37 pm
    What is more memory and CPU efficient?
    Loadbang | t 1
    or
    Loadbang | int 1
    I'm trying to get as much of my patches as possible. I know both of them are so small operations that you wouldn't even notice, so look at it as if I want to be puristic efficient in my programming.

    • Feb 19 2006 | 6:48 pm
      Loadbang will be called by the GUI thread when the patcher is loaded, and it's only called once, so it's going to make not one iota of difference in this situation.
      [loadmess 1] saves on patcher real estate, though.
      nick rothwell -- composition, systems, performance -- http:// www.cassiel.com
    • Feb 19 2006 | 7:22 pm
      And in general?
      using
      int 1 instead of t 1?
    • Feb 19 2006 | 9:38 pm
      Yes. The example below pits 1024 [int 1] objects against 1024 [t 1] objects:
      The patch is too big to include as text. I'll leave the file up for the next week or so, then it'll go away.
      Also - Check out the Efficiency section in the Max Tutorials and Topics pdf. There's loads of good information there.
      -David
    • Feb 19 2006 | 10:09 pm
      Definitly int 1 over t 1.
      I've read something like this in the section mentioned but I was looking for it in the forums
    • Feb 19 2006 | 10:35 pm
      Im not sure that patch proves which is most memory or CPU efficient.
      Personally i don't really care, but i did find that if i chain together more than 2 of the sub-patchers containing the t's or i's i get a stack overflow. That seems a bit strange to me.....
      Anyone have a clue what's going on with that?
      best john.
    • Feb 20 2006 | 12:09 am
      Ooof - stack overflow. Ouch. I don't know why, but it definitely seems wrong. I was basing my test on another that appeared on the list a while back:
      https://cycling74.com/forums/index.php? t=msg&goto=28270&rid=0&S=798009278dd2011c2060452 7c700c467&sr ch=efficienc y#msg_28270
      Basically, whenever I want to test the CPU efficiency of an object I use either the method I posted before (tons of objects strung together), or the one now posted below, so if either method is wrong, or one is better than the other, I'd really love to know.
      -David
    • Feb 20 2006 | 1:10 am
      I don't think it's a bad test at all. but sometimes efficiency is not all about raw speed. It's interesting to see the difference between the speeds of t vs. i though.
      best,
      john