[zeromq-dev] Improving zeromq in OOM conditions

Ilja Golshtein ilejncs at narod.ru
Mon May 16 15:32:58 CEST 2011


I think this article http://lazarenko.me/tips-and-tricks/c-exception-handling-and-performance addresses performance considerations.
My own experience is in line with the text. 
The only issue is inlining - sometimes after catch or something is added compiler does not inline a function.

If error handling makes sense, performance is meaningful, quality of code is meaningful and all 
developers understand how to use exceptions properly, C++ exceptions are very good.

On the other hand, we know tons of good and fast code don't use exceptions (end even don't use C++ ;) )

Thanks.


16.05.2011, 17:05, "Fabien Ninoles" <fabien.ninoles at ubisoft.com>:
> Also, in the gaming industry, most of our stuff have exception deactivated.  Performance is the main reason here:  exception create an overhead that isn't compensate by error handling (error handling ?  in a game ?  what's that ? ;) ).
>
> Fabien
>
> -----Message d'origine-----
> De : zeromq-dev-bounces at lists.zeromq.org [mailto:zeromq-dev-bounces at lists.zeromq.org] De la part de Martin Sustrik
> Envoyé : 16 mai 2011 06:12
> À : ZeroMQ development list
> Cc : Ilja Golshtein
> Objet : Re: [zeromq-dev] Improving zeromq in OOM conditions
>
> Hi Ilja,
>
>>  Could someone please explain why catching exceptions is dissalowed.
>>  Or "discouraged" has less strong meaning?
>
> The problem is exceptions is that they make failure execution paths
> almost pretty blurry. When you throw an exception, it's basically
> impossible to find out who's (if at all) is going to catch it etc.
>
> Exceptions are great for low reliability systems (GUIs and alike) but
> are not very good for systems that are supposed to be highly reliable.
> Error handling should be as explicit as possible in the latter case.
>
>>  Strong paradigms (like don't use delete, don't catch exceptions) are
>>  fine for students' works, not for real things.
>
> The paradigm we use is well-established C paradigm ("return an error code").
>
> On a different topic: The dependency on STL is pretty weak and can
> possibly be removed as part of the OOM work (fixed size containers
> instead of resizeable containers etc.) thus getting rid of exceptions
> entirely.
>
> Martin
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev

-- 
Best regards,
Ilja Golshtein.



More information about the zeromq-dev mailing list