> From: peter.crowth...@googlemail.com [mailto:peter.crowth...@googlemail.com] 
> On Behalf Of Peter Crowther
> Subject: Re: [OT] Followup on 32-bit versus 64-bit performance discussion(s)

> > Also, a Java int, when allocated on the stack, must take up the same number
> > of bits as a pointer.

> That's an interesting space/time trade-off (I presume it's 
> to prevent excess arithmetic on stack value accesses).

It's a requirement of the JVM (not language) spec so that the various stack 
manipulation byte codes can be independent of the type of data on the stack.  A 
pointer, int, or float must take one stack slot, while a long or double must 
take two - regardless of the size of a slot.  A modern JIT is certainly aware 
of the type of data in each stack slot, but interpreters aren't, so it's likely 
to stay that way.

 - Chuck
 

THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to