|
|
|
|
|
by YesBox
87 days ago
|
|
> A cache miss is going to mean anywhere from a 100 to 1000 cycle penalty. That blows out any sort of hit you take cutting your cycles from 3 to 1. A good example of this is using std::vector<bool> vs. std::vector<uint8_t> in the debug build vs release build. vector<bool> is much slower to access (it's a dynamic bitset). If you have a hot part of the code that frequently touches a vector<bool>, you'll see a multiple X slowdown in the debug build. However, in the release build, there is no performance difference between the two (for me at least, I'm making a fairly complicated game). The cache misses bury it. |
|