As opposed to the C++ code, above we can see bar case precedes foo case. Since foo case is
unlikely, and instructions of bar are pushed to the pipeline, thrashing the pipeline is unlikely.
This is a good exploitation of a modern CPU

本文讨论了在C++代码中,通过将不太可能发生的foocase指令置于barcase之前,可以有效利用现代CPU的特性,减少pipelinethrashing,从而提高执行效率。
As opposed to the C++ code, above we can see bar case precedes foo case. Since foo case is
unlikely, and instructions of bar are pushed to the pipeline, thrashing the pipeline is unlikely.
This is a good exploitation of a modern CPU


被折叠的 条评论
为什么被折叠?