Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
c
cpp
img
README.MD

README.MD

Identical bubble sort algorithm in C and C++. Same data and same computer. Experiment shows that C is twice as slow as C++.

In C it takes 124 processor clicks or 0.000124 sec.

In C++ it takes 66 processor clicks or 0.000066 sec.

gcc -Wall c-bubble-sort.c -o c-bubble-sort
c++ -Wall cpp-bubble-sort.cpp -o cpp-bubble-sort

c

c++

You can’t perform that action at this time.