"注册"关键字用C? [英] "register" keyword in C?

查看:179
本文介绍了"注册"关键字用C?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是注册关键字C语言吗?我已阅读,它用于优化但不以任何标准明确规定。它仍然是相关的,如果是这样,当你使用它?

What does the register keyword do in C language? I have read that it is used for optimizing but is not clearly defined in any standard. Is it still relevant and if so, when would you use it?

推荐答案

这是编译器一个暗示,该变量将被频繁使用,并且您推荐如果可能的话它被保存在一个寄存器。

It's a hint to the compiler that the variable will be heavily used and that you recommend it be kept in a processor register if possible.

大多数现代编译器做自动,并且在挑选他们比我们人类更好。

Most modern compilers do that automatically, and are better at picking them than us humans.

这篇关于"注册"关键字用C?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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