84% PERFORMANCE INCREASE?
59 minutes ago, Gat Pelsinger said:So that's it? I can allocate about 7 variables in the registers, which always might change depending on the platform, OS and the situation?
More likely compiler and target CPU architecture, but yes.
As you said, the keyword is deprecated, which means future compilers might complety ignore it or no longer support it altogether (i.e. refuse to compile because the keyword is unknown)
QuoteWill I be able to allocate more if I use a smaller size variable?
Possible, but again depends on how the compiler treats the code.
You should probably try this with a more complex algorithm. And set the compiler to full optimization.
It should already use registers if it thinks it appropriate.
Incrementing a register's contents is naturally quite fast, most modern CPUs should be able to do this in one clock cycle. With vector instructions you could possibly even do it for multiple at once.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now