[EMAIL PROTECTED] writes:
> A fairly large bytecode savings.
Bah, it's negligible. Maybe on the order of ten bytes per return.
Most of the difference you're seeing there is unused exception
handling code, in case the code inside the synchronized block throws
an exception. I didn't realize it was as significant as it is,
though. It looks like method-level synchronization is actually taken
care of by the JVM *in* the iload and return operations, rather than
before or after them.
> Making the whole method synchronized blocks any concurrent calls to
> that object, though.
You're blocking them either way. You shouldn't synchronize any more
code than you have to, but there's no reason you can't break the
necessary code out into its own method.
-S
_______________________________________________
Freenet-dev mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/mailman/listinfo/freenet-dev