3 ms·
It's not slightly faster, it can be an order of magnitude faster. Example: a listen loop which handles disconnections through exceptions. This isn't stupid but
by shin_lao 16y ago
It's not slightly faster, it can be an order of magnitude faster.
Example: a listen loop which handles disconnections through exceptions. This isn't stupid but it's not very efficient.
- Quarrelsome 16y agoWhy is it not stupid? If disconnections are part of normal application flow then why would you use an exception? You are correct, I was somewhat disingenuous with _slightly_ faster. It is lots faster but lots faster in error cases, which from a philosophical angle is still absurd. As long as you use your exceptions for "bad shit" (uncommon error conditions or completely unexpected failures or returns) then I still strongly believe that the performance comparison is silly.
- anonymous246 16y agoMaybe I'm missing something. Are you saying that in your application, handling rarely-occuring unanticipated disconnections via exceptions has such high overhead that its results in unacceptable performance?