This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Great... I wouldn't like changing good coding manner...That's the idea. Really, if there is any significant overhead for an unused handler that would be a bug.So practically no overhead?I was wondering: Is there any significant cost in having "unused" try-catches in my code? That is, I have a method that 99.99% of the times invoked never throws a given exception. However, in case it does, I need to log it...The only cost is the unwinder tables, (which are not read into memory unless your exception is thrown) and the handler itself, which may cause some instruction cache presure.
Perfect, I'm running Linux on a PPC405! Thanks _alot_ for the answers...This seems to indicate that in both gcj and J2SDK1.4.2_04 on Windows there is significant overhead. (And that the Sun JVM seems to be 4 times faster at this contrived "benchmark").Ah yes, Windows still uses longjmp. Similar hardware, Linux: without try/catch 207ms with try/catch 227ms without try/catch 202ms with try/catch 209ms
Regards, Martin Egholm
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |