42 lines
1.6 KiB
Plaintext
42 lines
1.6 KiB
Plaintext
|
notes Léo Rocher
|
||
|
|
||
|
./student_rank 5 5 1
|
||
|
gprof ./student_rank
|
||
|
-b pour enlever les explications
|
||
|
|
||
|
|
||
|
|
||
|
% cumulative self self total
|
||
|
time seconds seconds calls Ts/call Ts/call name
|
||
|
0.00 0.00 0.00 30 0.00 0.00 bubblesort
|
||
|
0.00 0.00 0.00 25 0.00 0.00 find_rank_student
|
||
|
0.00 0.00 0.00 10 0.00 0.00 print_array
|
||
|
0.00 0.00 0.00 5 0.00 0.00 generate_array
|
||
|
0.00 0.00 0.00 2 0.00 0.00 free_array
|
||
|
0.00 0.00 0.00 2 0.00 0.00 print_student_array
|
||
|
0.00 0.00 0.00 1 0.00 0.00 generate_grades
|
||
|
0.00 0.00 0.00 1 0.00 0.00 generate_ranks
|
||
|
0.00 0.00 0.00 1 0.00 0.00 sort_students
|
||
|
|
||
|
|
||
|
./student_rank 1000 1000 0
|
||
|
|
||
|
% cumulative self self total
|
||
|
time seconds seconds calls s/call s/call name
|
||
|
81.50 2.27 2.27 1001000 0.00 0.00 bubblesort
|
||
|
18.31 2.78 0.51 1000000 0.00 0.00 find_rank_student
|
||
|
0.36 2.79 0.01 1 0.01 2.79 sort_students
|
||
|
0.00 2.79 0.00 1000 0.00 0.00 generate_array
|
||
|
0.00 2.79 0.00 2 0.00 0.00 free_array
|
||
|
0.00 2.79 0.00 1 0.00 0.00 generate_grades
|
||
|
0.00 2.79 0.00 1 0.00 0.00 generate_ranks
|
||
|
|
||
|
|
||
|
time ./student_rank 1000 1000 0
|
||
|
|
||
|
real 0m2.844s
|
||
|
user 0m2.818s
|
||
|
sys 0m0.007s
|
||
|
|
||
|
trop d'appel à bubblesort, il y a un appel à la fonction en trop l.58 dans la fonction find rank de student_rank.c.
|
||
|
--> gain de temps
|