Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> a stack trace takes a lot of overhead to generate

Can't Hotspot not generate the stack trace when it knows the exception will be caught and the stack trace ignored?



It can and that optimization has existed for a while.

Actually it can also just turn off the collection of stack traces entirely for throw sites that are being hit all the time. But most Java code doesn't need this because code only throws exceptions for exceptional situations.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: