Hi all,

I want to know the optimization code for following c source code:

int i=0;

i=p*q<<12;

if(i>20)

i=15;

so here i should range from 0 to 15 but if i goes beyond 20 then it should remain as 15.

Here I have hint as to use bitwise operator to optimize like i=(p*q<<12)& 0x000F;

Also please anyone can tell me the ebooks or links or good book to start with the optimization of c source code.

I am the beginner in the C source code optimization and speech coders.

Please help me out to optimize the source c codes...

also different tricks to optimize the arithmetic operations any links please help...

Sushant