answersLogoWhite

0

The register keyword tells the compiler to store the variable onto the CPU register if space on the register is available. The reasoning is that register operations are always faster than memory operations and thus if used correctly, it can speed up an algorithm. However, the register keyword is a somewhat antiquated procedure since for quite a long time the optimizer in modern compilers are smart enough to detect when storing a variable on the register will be advantageous and will do so during optimization. There for, suggesting to the compiler to store a variable on the register can only make things slower if used incorrectly.

The register keyword tells the compiler to store the variable onto the CPU register if space on the register is available. The reasoning is that register operations are always faster than memory operations and thus if used correctly, it can speed up an algorithm. However, the register keyword is a somewhat antiquated procedure since for quite a long time the optimizer in modern compilers are smart enough to detect when storing a variable on the register will be advantageous and will do so during optimization. There for, suggesting to the compiler to store a variable on the register can only make things slower if used incorrectly.

User Avatar

Wiki User

17y ago

What else can I help you with?

Related Questions

Is it possible to declare a keyword as an identifier in c plus plus?

No. Keywords are reserved and cannot be used as identifiers. However, C/C++ is case-sensitive. So although register is a reserved keyword, Register is not.


Why you use class keyword in c?

You may use it as an identifier, because it is not a reserved word in C.


What is use of keyword extra in c plus plus programming?

Nothing.


Is in is used as a keyword in C language?

Neither "in" nor "is" is a keyword in C.


What keyword is using to create objects?

In C# and Visual Basic.NET the keyword is "new". C doesn't have such an animal, but you generally use the library call to malloc to get new memory.


Is the keyword "c" included in the question?

Yes, the keyword "c" is included in the question.


What is the syntax for determining the size of an array in C using the keyword sizeof?

To determine the size of an array in C using the keyword sizeof, you would use the syntax: sizeof(array) / sizeof(array0).


What is meaning of keyword in c language?

'Keyword' is a synonym for 'reserved word', it is not specific to C language.


How does the use of the 'void' keyword differ in C plus plus vs. C?

It doesn't. Void has the same meaning in both.


What are the guitar chord notes for the keyword "C major"?

The guitar chord notes for the keyword "C major" are C, E, and G.


Can I use your keyword in my question?

Yes, you can use the keyword in your question.


How java use extern key word which is used in C plus plus?

No extern keyword in Java.