Exception Handling (when to use it)
john_oshea@wordbank.com
john_oshea at wordbank.com
Fri Jul 13 10:40:53 BST 2007
Ovid wrote:
> Hmm, it would be nice if someone would start benchmarking various
> Perl exception handling mechanisms to make it easier to understand
> "best practices".
The Exception::Base author appears to have done so (but no mention of
what, exactly, the benchmarks were, so take with the appropriate pinch
of salt)
> The Exception::Base module was benchmarked with other implementation. The results are following:
>
> pure eval/die with string: 504122/s
> pure eval/die with object: 165414/s
> Exception::Base module with default options: 6338/s
> Exception::Base module with verbosity = 1: 16746/s
> Error module: 17934/s
> Exception::Class module: 1569/s
> Exception::Class::TryCatch module: 1520/s
> Class::Throwable module: 7587/s
[lifted from
<http://search.cpan.org/~dexter/Exception-Base-0.07/lib/Exception/Base.pm#PERFORMANCE>]
--
John O'Shea
Wordbank Limited
33 Charlotte Street, London W1T 1RR
Direct line: +44 (0) 20 7903 8829
Fax: +44 (0) 20 7903 8888
<http://www.wordbank.com/>
More information about the london.pm
mailing list