KoblentsBlog Photography
Contact About
Ches
C++ 'Register'
In C/++, there exists a keyword 'register', which specifies that the variable should be kept in a CPU register if possible.
register int i;
The compiler will optimize certain variables to sit in the register and the compiler can refuse to put a specified variable into the register if there is not enough room, but it can also be specified manually.
I don't think anyone has used this keyword in years, and for good reason, but it's there.
Ches Koblents
July 18, 2012
 
« Newer Older »
© Copyright Koblents.com, 2012-2024