A very elementary kind of question I’m sure, but I’m wondering if there is any computational difference or whether one method might be preferred over the other in the case of prepending with the prepend object or with a message object.
----------begin_max5_patcher---------- 504.3ocyV10aBBCEF9Z3WQSytzYnEXV1c62whYgOpttHEBTyby3+8Q+.kYTR 2PQuoI8bNEd6aenb155.SJ1PqgfmAuBbb1553nBIC3Xl6.yi2jtJtVUFLmVW GujBmnyInaDp3kUzRJOCjQWjVvaSyWmy3qnB0ZwlfKJ3hZ12TYLDdp2gZKVK ZKFYhpCI9pjpUIDBlaRUFKRemwW9VEMUny5SjOOPvL4XTfbDQl5seIrLkXKR 93QLF1QO73b0K.9REKdETlXmqqbXhkFSi7SnUmbi2tWZ7nZJWDKXE7NhN.6o DpRzdlg8R1J2BeN2hwEvI.XRLeoMFmVCgJQf8NswghtrF24HJMIAP8xR8aoA CvRGD.RPJ.jzK.5cgAP5mMO1+yGlnquuPBO96xyhWA2+3ENJRtE7CPiMeg75 fW8d+Fx+d49MLwbeB4FdAmF.s59M7cD.dMQIhu0rD5t4ekHEDMCcCQIbHwVV Zb+U4C2LVxXI562exuOVhXmknVJbEieb6op2tL9u8o5h0UosZssMEvAEjQqE LtBm5TjrIvNE8NKKipx2ZN4rrxhFvvHBv7SdpcY0TSeA.j8ZxOBMMrw60c9Z Z.t6jYA5yFOYYxICbWbjo0ytXDcVazjr0hwTSA1nI++1o8.0DwFIgFUIYy2D jAbv0LYm6O.sV9l7 -----------end_max5_patcher-----------
i cant look at the patch but i can guess the situation.
using a messagebox is definetly slower because of the graphics update
which probably need 10 times more CPU to pass "hello" than all other
thats true for everything with graphics. so as soon as you are experienced
enough to know things like gate, bang, messages by heart you should
stop using button, flonum, messagebox, grapic gates and this stuff as
they only make your patch slower.
vanille: what about sprintf? of course it wont work for lists.
Thanks for the comments. I see it’s probably as trivial as I thought it might be when it comes to small patches.
There’s a really cool tool called ‘pedant’ in the toolbox area, It compares the execution speed of 2 patchers (and can do N executions and calculate the average execution time).
I use it all the time and had a few surprises on what is efficient code and what isn’t.
Forums > MaxMSP