Tuesday, January 21, 2014

The Exceptional Performance of Lil' Exception

The post you’re reading is loosely based on two Russian blog posts (1) (2) I wrote a few years ago. Since that time, the JMH microbenchmarking framework has been released, making it possible to render the previous discussion more rigorous and quantitative. Those posts began when someone had asked me about the performance of the try-catch construct, and the performance implications of Exceptions in general. In this English version we unify and extend the previous Russian posts.

We would like to thank Marcus Lagergren for quick sanity checks on the post, and Jerry Kuch for lots of editorial comments on my non-native English. Thanks guys!

Along the way, we will take some diversions into benchmarking methodology, effectively making this post a primer on quantifying the performance of language features in a concrete implementation. If you still haven’t learned about JMH and/or haven’t looked through the JMH samples, then I suggest you do that first before reading the rest of this post for the best experience.

Brace yourselves and good luck.

Read more here

Leave a Reply

All Tech News IN © 2011 DheTemplate.com & Main Blogger .