Generally for(;;){} has better performance
for(;;){}
These two ; ; empty statements, the compiler will generally optimize them out, and directly enter an infinite loop.
while(1){}
Every time in the loop, it is necessary to judge whether the constant 1 is equal to zero. Here, while does more than for, but from the perspective of assembly, it is the same code.