优化有多重要? [英] How important is optimization?

查看:104
本文介绍了优化有多重要?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

昨天我和老板就构建软件时优化的适当作用展开了辩论.本质上,他的立场是,优化是整个开发过程中的首要问题.

I got into a bit of a debate yesterday with my boss about the proper role of optimization when building software. Essentially, his position was that optimization needs to be a primary concern during the entire process of development.

我的观点是,在开发过程中需要做出正确的算法决策,但是在开发过程中切勿盘算周期.实际上,对此我感到非常强烈,因此我不得不放弃谈话.我已经看到太多以优化"为名的错误编程决策,并且以这种方式更快"为由辩护的错误代码太多.

My opinion is that you need to make the right algorithmic decisions during development, but you should never be counting cycles during development. In fact, I feel so strongly about this I had to walk away from the conversation. I've seen too many bad programming decisions in the name of "optimization", and too much bad code defended with the excuse "this way is faster".

StackOverflow.com社区怎么看?

What does the StackOverflow.com community think?

推荐答案

我们应该忘记效率低下的问题,大约有97%的时间是这样:过早的优化是万恶之源.但是,我们不应该放弃那3%的临界机会."

"We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. Yet we should not pass up our opportunities in that critical 3%."

这篇关于优化有多重要?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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