Hello,

I want to process multiple CHOPs by adding them together (just like with Math CHOP → Combine CHOPs → Add), but before I would like to multiply each CHOP by specific value.

I have been looking for a way how to do this with lowest possible performance impact. Using Math CHOP with multiply for each input → and then combining these data sounds fine except the performance overhead.

*(Lets say each input would be time-sliced with 2 channels {800 samples} and multiplying it with Math CHOP would result approximately in about 0.030ms cook time. Doing so for 100 inputs would result in 3ms which isn’t ideal.)*

Since I haven’t figured out a better way how to do it with regular CHOPs, I thought it might be handy to do all of that in one CPlusPlus CHOP. I gave it a quick run to see how it would perform.

I have modified CPlusPlusCHOPExample to do the following:

- channels in first input represent values used to multiply incoming CHOPs
- once each CHOP is multiplied (by corresponding channel from first input), it is added to final output

It turned out to be quite slower than I expected… Processing 20 inputs results in approximately 0.350ms. For comparison Math CHOP that just adds all inputs together has much lower cook time - just about 0.040ms.

Please is there something that could be done in order to lower cook time of my CPlusPlus CHOP? I am attaching source code of modified example (basically only execute() is modified), compiled DLL and demo scene where it could be compared to Math CHOP (just hit number 1 and observe how cook time reacts to processing of all CHOPs). Thanks.

files.zip (29.1 KB)