Open main menu

CDOT Wiki β

Changes

Savy Cat

1,320 bytes added, 20:33, 27 March 2018
Rotate90
==== Profiling With gprof ====
At last we can measure performance. Giving Rotate90.exe an initial run:
 
[[File:File:Gprof-run1.png]]
 
During the run, Tiny_Shay completed seemingly instantly. Medium_Shay had a slightly noticeable latency, but seemed to be less than a second. Large_Shay took a noticeable amount of time, at least a couple seconds.
 
Generate the gprof .flt file:
gprof -p -b Rotate90 > r90.flt
 
The results with these parameters group all calls to the rotate90 function together (36 calls total). Together, this accounts for 97.57% execution time, taking a total of 4.02 seconds. The only other call that took longer than .01 seconds was the libjpeg method responsible for initializing CImg pixel values from reading the .jpg files (.10 seconds):
 
<nowiki>
Each sample counts as 0.01 seconds.
% cumulative self self total
time seconds seconds calls ms/call ms/call name
97.57 4.02 4.02 36 111.67 111.67 rotate90(cimg_library::CImg<unsigned char>, cimg_library::CImg<unsigned char>&)
2.43 4.12 0.10 3 33.33 33.33 cimg_library::CImg<unsigned char>::_load_pnm(_IO_FILE*, char const*)
0.00 4.12 0.00 36 0.00 0.00 cimg_library::CImg<unsigned char>::CImg(cimg_library::CImg<unsigned char> const&)
0.00 4.12 0.00 33 0.00 0.00 cimg_library::cimg::strcasecmp(char const*, char const*)
...</nowiki>
=== Assignment 2 ===
=== Assignment 3 ===
93
edits