110,568
社区成员
发帖
与我相关
我的任务
分享
int a = 1000;
int result = 0;
Stopwatch sw = new Stopwatch();
sw.Start();
for (long i = 0; i < 10000000000; i++)
{
result = a * 7;
}
sw.Stop();
MessageBox.Show(sw.Elapsed.ToString());
int a = 1000;
int result = 0;
Stopwatch sw = new Stopwatch();
sw.Start();
for (long i = 0; i < 10000000000; i++)
{
result = (a << 3) - a;
}
sw.Stop();
MessageBox.Show(sw.Elapsed.ToString());