program performance

Can anyone tell me how I can boost the performance of my program in C and in JAVA?