网上看到,说前置++比后置++效率高,个人觉得都是对变量加1,效率应该没有区别,于是在vs2010中探索一番,特在此记录,如有不妥,欢
迎拍砖。
1. 仅对内置数据类型自加,两者效率一样
#include "stdafx.h"
#include <stdio.h>
#include <iostream>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
int a=1,b=2;
int c,d;
a++;
++b;
return 0;
}
汇编代码如下&#