ID:1200347
 
Keywords: , compressing, if, lag
(See the best response by Kisioj.)
Code:
if(src.mayuri && src.health <=0 && src.wound>=100||src.mayuri && src.wound>=200||src.shonshui && src.health <=0 && src.wound>=100||src.shonshui && src.wound>=200||src.kenpachi && src.health <=0 && src.wound>=100||src.kenpachi && src.wound>=200)


Problem description:

When I kept each if statement separate and checked Self CPU it was lower than when I combined them to do the same thing. Does "||" cause more lag or am I just having bad luck?
Best response
There's no way that this one if could change your CPU to noticeable level. How did you test its CPU eating? Did you run it in a loop? Anyway the code is confusing and you should really add some parenthesis inside.

if( (mayuri || shonshui || kenpachi) && ( (health<=0 && wound>=100) || wound>=200 ) )


PS. Notice that you don't have to write
src.
before variable names.
It depends on order. Maybe your multiple if's had better order than single one, so it was executed quicker.