
Tim Sweeney: Eliminating C++ exceptions gave 15% speedup - JabavuAdams
https://twitter.com/TimSweeneyEpic/status/1223077404660371456
======
je42
Quite an improvement. However, i feel like that the tweet also displays the
(sometimes emotional) feelings toward exceptions that a large part of the C++
community has.

Herb Sutter made an excellent presentation about this "fragmentation" of the
community and steps towards fixing this split:

[https://www.youtube.com/watch?v=ARYP83yNAWk](https://www.youtube.com/watch?v=ARYP83yNAWk)

------
ncmncm
Other people (e.g. Bjarne) report a 13% speedup by switching to exceptions,
away from checking and propagating status codes. It seems hard to get a
speedup by not using exceptions unless your code was littered with catch
blocks, and throws from normal system events.

The extra code to check and handle status codes creates places for latent
bugs. It's usually very poorly exercised, and it obscures the logic for the
normal, non-failure case.

My favored way to fix bugs is to delete the code they are in. I don't even
need to know where they were.

~~~
ludamad
The code was already written without exceptions in this case, it was more
mysterious compiler behaviour apparently. As for which is faster, people
writing games don't tend to spend a lot of time validating data in real time,
and thus have a constant factor to lose and not much to gain

~~~
ncmncm
Thank you, that puts the report in context. I can't get the tweet to come
up... does it identify the compiler?

