Re: Declaring outside a loop: speed? memory?
- From: Ben Caradoc-Davies <ben@xxxxxxxxxxxxx>
- Date: Tue, 23 Jan 2007 21:12:36 +0900
Philipp wrote:
Just wondering, is there a speed or memory difference between the two following codes?
Funny you should ask, because it was just mentioned on Planet Classpath http://planet.classpath.org/
Local Variables in Java
http://rmathew.blogspot.com/2007/01/local-variables-in-java.html
In short, there is no difference. The JVM specification requires them to be the same, and the same bytecode is generated.
--
Ben Caradoc-Davies <ben@xxxxxxxxxxxxx>
http://wintersun.org/
Stop Labor's plan to censor the internet:
http://efa.org.au/Issues/Censor/mandatoryblocking.html
.
- Follow-Ups:
- Re: Declaring outside a loop: speed? memory?
- From: Steve W. Jackson
- Re: Declaring outside a loop: speed? memory?
- From: Philipp
- Re: Declaring outside a loop: speed? memory?
- References:
- Declaring outside a loop: speed? memory?
- From: Philipp
- Declaring outside a loop: speed? memory?
- Prev by Date: .How can we access the mobile file system using J2ME ?
- Next by Date: Re: Declaring outside a loop: speed? memory?
- Previous by thread: Declaring outside a loop: speed? memory?
- Next by thread: Re: Declaring outside a loop: speed? memory?
- Index(es):
Relevant Pages
|