Changes

Jump to: navigation, search

Thunderbird

1,050 bytes added, 18:41, 9 February 2017
Profiling: bubble vs quick algorithm
Using compiler settings (gcc version 5.2.0):
g++ -c -O2 -g -pg -std=c++14 a1.cpp
 
Sorting for 50000
Flat profile:
Each sample counts as 0.01 seconds.
% cumulative self self total
time seconds seconds calls ns/call ns/call name
99.97 71.90 71.90 BubbleSort(int*, int)
0.01 71.91 0.01 66645 150.05 150.05 InsertionSort(int*, int, int)
0.01 71.92 0.01 QuickSort(int*, int, int)
0.00 71.92 0.00 1 0.00 0.00 _GLOBAL__sub_I__Z10BubbleSortPii
 
Sorting for 100000
Flat profile:
Each sample counts as 0.01 seconds.
% cumulative self self total
time seconds seconds calls ns/call ns/call name
99.97 71.90 71.90 BubbleSort(int*, int)
0.01 71.91 0.01 66645 150.05 150.05 InsertionSort(int*, int, int)
0.01 71.92 0.01 QuickSort(int*, int, int)
0.00 71.92 0.00 1 0.00 0.00 _GLOBAL__sub_I__Z10BubbleSortPii
Sorting for 200000
Flat profile:
 
Each sample counts as 0.01 seconds.
% cumulative self self total
49
edits

Navigation menu