[esnacc-dev] [PATCH] cxx-lib: do not use exceptions in performance critical operators

Aaron Conole aconole at bytheb.org
Wed Mar 22 12:59:38 UTC 2017

Kovács László <laszlo.kovacs at neti.com> writes:

> In asn-buf.cpp the operator<() and the operator==() methods 
> suffer from a performance issue, they are running in a loop until 
> an exception is not thrown. This is a very bad idea, and very 
> inefficient way of error handling. I have done some performance 
> tests with gproof. The performance has improved about 4 times better, 
> the code runs faster after my fix. I removed the exception handling from 
> operator<() and the operator==() and replaced them to a 
> boolean function, that can signal if an exception would be thrown.
> Signed-off-by: László Kovács <sabbath24 at gmail.com>
> ---

Thanks!  I've applied this to master.

Welcome to the community, László.

More information about the dev mailing list