[英]Time difference in compilation?
I have two c++ programs named example.cpp (takes two numbers and outputs their sum) in two directories: my home directory
and inside a folder in var/www/myfolder
. 我在两个目录中有两个名为example.cpp的c ++程序(使用两个数字并输出其总和):
my home directory
和var/www/myfolder
的文件夹。
When I run the following command g++ example.cpp
(command line) in both directories the time differs. 当我在两个目录中运行以下命令
g++ example.cpp
(命令行)时,时间有所不同。 In the first case it takes 0.5sec
and in the second 0.072 sec
. 第一种情况需要
0.5sec
,第二种情况需要0.072 sec
。 Why so much difference?? 为什么有这么大的差异?
I am using ubuntu 12.04. 我正在使用ubuntu 12.04。
我怀疑您的主目录不在您的计算机本地,因此对其进行读写可能会导致网络延迟。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.