article - 编写高效C代码的指南 [英] article - Guidelines for writing efficient C code

查看:72
本文介绍了article - 编写高效C代码的指南的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

仅供参考:


编写高效的C / C ++代码指南

http://www.embedded.com/showArticle....leID=184417272


任何评论?

FYI:

Guidelines for writing efficient C/C++ code

http://www.embedded.com/showArticle....leID=184417272

any comments?

推荐答案

Marco写道:
FYI:

编写高效C / C ++代码的指南

http://www.embedded.com/showArticle....leID=184417272

任何评论?
FYI:

Guidelines for writing efficient C/C++ code

http://www.embedded.com/showArticle....leID=184417272

any comments?




指南#1:忽略任何教导的人关于神话般的C / C ++

编程语言。


准则#2:忽略任何认为编写代码指南的人
和用C ++编写的代码指南应该类似。



Guideline #1: Ignore anyone who "teaches" about the mythical "C/C++"
programming language.

Guideline #2: Ignore anyone who thinks that guidelines for code written
in C and guidelines for code written in C++ should be similar.


Martin Ambuhl写道:
Martin Ambuhl wrote:
Marco写道:
仅供参考:

编写高效的C / C ++代码的指南

http://www.embedded.com/showArticle....leID=184417272

任何评论?
FYI:

Guidelines for writing efficient C/C++ code

http://www.embedded.com/showArticle....leID=184417272

any comments?



指南#1:忽略任何教导的人关于神秘的C / C ++编程语言。

指南#2:忽略任何认为用C编写的代码指南和代码指南的人用C ++编写的应该是类似的。



Guideline #1: Ignore anyone who "teaches" about the mythical "C/C++"
programming language.

Guideline #2: Ignore anyone who thinks that guidelines for code
written in C and guidelines for code written in C++ should be similar.




应该注意的是,该文章涉及为嵌入式

应用程序编写代码,并且非常适合于,不是一般的

编程。它是由Green Hills的一个人写的,可能不是发布此链接的

的人。正如它在那里所说:


本文摘自2006年硅谷嵌入式系统大会上提交的同名论文。与之相关

嵌入式系统大会的许可。


Brian



It should be noted that the article concerns writing code for embedded
applications and is heavily geared towards that, not general
programming. It''s written by a guy from Green Hills, probably NOT the
person who posted this link. As it says there:

"This article is excerpted from a paper of the same name presented at
the Embedded Systems Conference Silicon Valley 2006. Used with
permission of the Embedded Systems Conference."

Brian


Marco写道:
仅供参考:

编写高效的C / C ++代码的指南

http://www.embedded.com/showArticle....leID=184417272

任何评论?
FYI:

Guidelines for writing efficient C/C++ code

http://www.embedded.com/showArticle....leID=184417272

any comments?



"结论


程序员在编写代码时所做的一些决策对性能的影响

他们的代码可能很重要。虽然高效的算法设计具有最高的重要性,但在实施设计时做出明智的选择

可以帮助应用程序代码以最高的潜力发挥作用。


像这样的段落激发了我对丰富性和书面语言沟通的巨大潜力的深深钦佩,以及同样深刻的b
悲伤。这是多么容易被浪费。


文章的其余部分毫无价值(与空虚相对);

的任何人都明白这些指导原则背后的原因并不需要它们,并且

任何不这样做的人都不应该被置于可以申请的状态

他们。然而,显然,这并不是现实因素,而是枯燥乏味,而是作为练习留给读者。


on less愤世嫉俗的说明,我喜欢喝茶。不幸的是,这篇文章没什么关系

,但你不能拥有一切。


S.


"Conclusion

The performance impact of some decisions that programmers make when writing
their code can be significant. While efficient algorithmic design is of the
highest importance, making intelligent choices when implementing the design
can help application code perform at its highest potential."

Paragraphs like these inspire a deep admiration in me for the richness and
vast potential of written language in communication, and an equally deep
sadness for how easily this is squandered.

The rest of the article is worthless (as opposed to vacuous); anyone who
understands the reasoning behind these guidelines does not need them, and
anyone who does not should not be put in a situation where they could apply
them. Obviously, however, this is not factoring in reality, which is rather
boring and depressing, and left as an exercise to the reader.

On a less cynical note, I like tea. Unfortunately that has nothing to do
with the article, but you can''t have everything.

S.


这篇关于article - 编写高效C代码的指南的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆