奔跑的小河
Talk is cheap. Show me the code.

导航

 

2015年5月30日

摘要: C++测试代码运行时间方法 方法一 最常用的执行时间测试方法,利用clock函数,精确度能达到ms级。 直接看代码吧,这样最直观: #include "stdafx.h" #include <ctime> #include <vector> #include <iostream> using nam 阅读全文
posted @ 2015-05-30 22:21 奔跑的小河 阅读(411) 评论(0) 推荐(0) 编辑
 
摘要: 指令周期 指令周期是CPU从内存取出一条指令并执行这条指令的时间总和,一般由若干个机器周期组成,是从取指令、分析指令到执行完所需的全部时间。 机器周期 机器周期也叫CPU周期,由于CPU访问一次内存所花的时间较长,因此用从内存读取一条指令字的最短时间来定义。在计算机中,为了便于管理,常把一条指令的执 阅读全文
posted @ 2015-05-30 20:54 奔跑的小河 阅读(1504) 评论(0) 推荐(0) 编辑
 
摘要: 描述: Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the t 阅读全文
posted @ 2015-05-30 16:33 奔跑的小河 阅读(117) 评论(0) 推荐(0) 编辑