In general, to study the performance of an algorithm you should fist implement the algorithm and than implement a function that
- queries a timer
- call the algorithm giving it the required testing data
- queries the timer (again)
The difference between the values of the two queries is the elapsed.
About timers, you can fund some useful articles here
http://www.codeproject.com/info/search.aspx?artkw=high+resolution+timer[
^]
or by google "windows high resolution timer".