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.
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 int
is 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
if register int
Note that in general circulation in the multilayer