且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

并行编程:需要帮助!

更新时间:2022-01-09 05:06:17

通常,要研究算法的性能,您应该首先实现算法,而不是实现函数那

-查询计时器
-调用算法,为其提供所需的测试数据
-再次查询计时器

两个查询的值之间的差是经过的时间.
关于计时器,您可以在此处资助一些有用的文章
http://www.codeproject.com/info/search.aspx?artkw=high+ resolution + timer [^ ]
或通过Google"Windows高分辨率计时器".
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".