File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Overheads using short datatype Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Overheads using short datatype" Watch "Overheads using short datatype" New topic

Overheads using short datatype

rakesh nagar

Joined: Aug 02, 2001
Posts: 17
Hi there,
I have a requirement for declaring an int constant. The value of constant is less than 10. I am using short datatype for storing this constant value.
Could you please tell me if there are some performance overheads of using short over int datatype.
Thanks & regards,
Rakesh Nagar
Sean MacLean
Ranch Hand

Joined: Nov 07, 2000
Posts: 621
This seems like a good question for the knowledgable folks in the Performance forum, so I'm moving this question there.
I agree. Here's the link:
subject: Overheads using short datatype
It's not a secret anymore!