Just having a look at the output of compiling your patch. For some reason it results in a lot of double precision maths. It really shouldn't, since we do all floating point calculations in single precision. I don't know why or where this is happening but trying to work it out. But I don't think the problem is your patch!
What version of Max are you using?