msg vs int/float

jamesson's icon

To briefly (I promise! :)) go back to my complaints about strict typing

Is there an advantage to be had by using int/float vs msg? Their function (as a local variable) is mechanically and structurally identical - you plugs your value in the right inlet and your bang in the left, and your msg with an $variable into the outlet. Surely if static typing exists for any reason other than reverse compatibility int/float would provide nontrivial performance gains?

Many thanks in advance

Roman Thilenius's icon

the biggest problem is converting types, so always use that what you will need on the other end.

jamesson's icon

nicolas; re my original question, ty, I have no idea how I missed the display part of msg (insufficient sleep :)).

re profiling, its still a cool trick.

A) why is it useless for real work?

B)which code profiler do you recommend?

Thanks again

joe

Chris Muir's icon

One of the biggest wins for fixed types is that you know how big they are. A message have (fairly) arbitrary lengths, and have to be parsed.

Max Patch
Copy patch and select New From Clipboard in Max.

This is a simple test to illustrate some of the cost:

jamesson's icon

chris, another excellent point. See, I can be reasonable if you give me an argument :).