Changes between Version 1 and Version 2 of HowToMakeCodeFaster
- Timestamp:
- Mar 6, 2008, 10:47:54 AM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
HowToMakeCodeFaster
v1 v2 1 1 == Speeding up your code == 2 2 3 First you should try to get an idea which routines are consuming most of your CPU time:3 1. First you should try to get an idea which routines are consuming most of your CPU time: 4 4 5 5 * Use the "-p" option together with your usual compiler flags. 6 6 * Recompile the whole code. 7 7 * Run the code with a sample job card. This will generate an additional file called "gmon.out". 8 * After the succesful run, just execute "gprof main.x gmon.out" which gives you the amount of consumed CPU time per subroutines. 8 * After the succesful run, just execute [[BR]] 9 {{{ 10 gprof main.x gmon.out 11 }}} 12 which gives you the amount of consumed CPU time per subroutines. 9 13 10 14 11 Now the hard part starts : Reducing the run time of the main consumers... 15 16 2. Now the hard part starts : Reducing the run time of the main consumers... 12 17 13 18