我们应该知道多少编译器? [英] How much of the compiler should we know?

查看:85
本文介绍了我们应该知道多少编译器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为了编写更好的代码,是否值得深入知道编译器做什么?

In order to write better code, is it worth to know deeply what the compiler does?

只要多少钱就够了?我不是一个擦除器,但我认为知道编译器如何操作将使我成为一个更好的程序员。我错了吗?

Just how much would be enough? I'm not a bit scrubber, but I was thinking that knowing how the compiler operates would make me a better programmer. Am I wrong?

如果是,您会推荐什么资源?

If so, what resources would you recommend?

推荐答案

不会伤害知道编译器如何优化你的代码,但不要为编译器写,而是写给人阅读

Probably wouldn't hurt to know how the compiler will optimize your code, but don't write for the compiler, but write for people to read.

以更好地为编译器优化的方式编写代码可能会使人们更难以阅读它,而且现在编译器可能知道更好地优化代码

Writing code in a way that is more optimized for the compiler may make it more difficult for people to read it, and these days the compiler probably knows better to optimize the code for you.

这篇关于我们应该知道多少编译器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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