Register int [Reserved] use

Disclaimer: This article is a blogger original article, follow the CC 4.0 by-sa copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/Liukairui/article/details/81115041
 
 

Today saw a piece of code so

void floyd(){
    for(register int a=1;a<=v;a++){
        for(register int b=1;b<=v;b++){
            for(register int c=1;c<=v;c++){
                if(G[b][a]+G[a][c]<G[b][c])G[b][c]=G[b][a]+G[a][c];
            }
        }
    }
    return;
}

 

 

This register intis indication register cpu internal registers (registers are part of the central processor registers is limited storage capacity high-speed storage means) variable, and int is the usual variable in memory, into the register can accelerate the write speed of the variable
which is a cyclic code in use 1e8 int used
Write pictures described here
if register int
Write pictures described here

Note that in general circulation in the multilayer

 

Guess you like

Origin www.cnblogs.com/phemiku/p/11403954.html