C比C ++快 [英] Is C faster than C++
问题描述
在我的一次采访中,有些人问我为什么C是更快的C ++,并告诉
我说明至少有两个原因。
我在网上找不到答案。
我会感激任何关于此的建议。
谢谢。
In one of my interview, some people asked me why C is faster C++, and tell
me to illustrate at least two reasons.
I can''t find the answer in the web.
I''ll appreciate any suggestion on this.
Thank you.
推荐答案
zhaoyandong写道:
zhaoyandong wrote:
在我的一次采访中,有人问我为什么C是更快的C ++,并告诉我/我说明至少有两个原因。
我无法在网上找到答案。
这不是更快。
我将不胜感激任何建议。
In one of my interview, some people asked me why C is faster C++, and tell
me to illustrate at least two reasons.
I can''t find the answer in the web.
It isn''t faster.
I''ll appreciate any suggestion on this.
去接受不同的采访。
Go to different interviews.
* zhaoyandong:
* zhaoyandong:
在我的一次采访中,有人问我为什么C更快的C ++,告诉我至少说明两个原因。
我在网上找不到答案。
我会感谢任何关于此的建议。
In one of my interview, some people asked me why C is faster C++, and tell
me to illustrate at least two reasons.
I can''t find the answer in the web.
I''ll appreciate any suggestion on this.
可能他们想检查你是否理解C
和C ++之间的区别。如果你这样做了,你会回答说每个C程序都可以用C ++表示,只需要很少的语法清理和
声明,而且通常是相同的编译器用于C和C ++。所以给了一个快速的C程序,你也有一个同样快的C ++程序。
然后你可能会继续谈论一些这个表现
可以用更短的开发时间和一般可维护性进行交易,而不是C ++,而不是C.
并得出结论,这两种语言本身都不比其他语言更快,但是C ++为您提供了更广泛的实用开发技术:所有
的C,加上加号(啊,_那是什么,++代表什么!)。
-
答:因为它弄乱了订单人们通常会阅读文字。
问:为什么这么糟糕?
A:热门帖子。
问:什么是usenet和电子邮件中最烦人的东西?
Probably they wanted to check whether you understood the difference between C
and C++. And if you did, you would have answered that every C program can
also be expressed in C++ with just minor cleaning up of syntax and
declarations, and that very often the same compiler is used for C and C++. So
that given a fast C program, you also have a just as fast C++ program.
And then you might have gone on to talk about how some of that performance
could be traded for shorter development time and general maintainability, in
C++, but not in C.
And concluded that neither language is inherently faster than the other, but
that C++ gives you a much wider range of practical development techniques: all
of C, plus plus (ah, _that_''s what the "++" stands for!).
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
zhaoyandong写道:
zhaoyandong wrote:
在我的一次采访中,有人问我为什么C是更快的C ++,并告诉我至少要说明一下有两个原因。
我在网上找不到答案。
In one of my interview, some people asked me why C is faster C++, and tell
me to illustrate at least two reasons.
I can''t find the answer in the web.
问题就是问哪个更快,兰博基尼或者法拉利的b
。答案应该是,它们的速度和它的驱动器一样快。
技能可以让它们去。
The question is like asking "which is faster, a Lamborghini or a
Ferrari". The answer should be, they''re only as fast as it''s driver
skill can make them go.
这篇关于C比C ++快的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!