posted 18 years ago
@ernest:
Exactly your argument I heared in my ear when reading the question, and my comment was already written, claiming 'same bytecode', but don't being sure about that, I wrote the two classes, and compared them: both 369 bytes, before hitting 'submit'.
Well - that's no proof, I thought, and called
I'm not able to interpret this, but as far as I can tell, this is not
identical bytecode.
But without using a realtime OS, my measurements might be garbage though.
What is your source of information?
@Kishore:
Pulling the variable out of the loop is useless.
Nulling it later is additional noise and makes rarely sense in normal places - here I only see disadvantages.
Keep the scope of variable clean, to make concepts visible.
Saving a microsecond after years of uptime will not pay the minutes, generations of programmers need to find out, that 'Collection objects', declared before the loop is only used inside the loop.
[ May 13, 2005: Message edited by: Stefan Wagner ]