I'm trying to squeeze every optimization possible from a particularly heavy function. Currently, there is this part:
//m: array of Integer;
//We get it from some other part
N:= Length(m)-1;
for i:=0 to N do
m[i]:=-m[i];
I need to do this twice per loop (i.e. with two arrays). So, I wonder: is there a better way?
Maybe bitwise operation? I don't know much about them. Will it be faster? How to make it quick?
Should I even try to optimize this part, or it is fine enough?