
Originally Posted by
Btcc22
To nitpick, this is true on certain architectures (PPC, where you'll take a huge performance hit for virtual calls) but indirect branch prediction has been around for quite a while. Developers would make efforts to avoid virtual calls on the Xbox 360 because it can matter for games.
Another nitpick would be trying to catch the std::bad_alloc exception. If you're out of memory, just let the program terminate. In many cases, the allocation is going to succeed and you'll end up hitting the wall when you actually attempt to make use of the memory, as the OS tries to back the page.
Bookmarks