View RSS Feed

My Java Tips

Java built-in data types (performance issues)

Rate this Entry
by , 11-06-2011 at 05:29 PM (1202 Views)
Java built in data types provide programmers ease of storing their required data in appropriate data type. But in come cases, it may become a bottleneck. When doing low level related work, the speed is very important. In such case don't use the Java built-in data types.




Lets take an example. If you are using an Integer class, just think of all the overhead you are creating by using the wrapper class. One rule of thumb is to use the primitives instead of wrapper. This will guarantee better performance. In our daily life, we do not consider using unsigned int or unsigned long because Java application that we are creating are fast enough and we donít really care about such things.

Performance is of concern when you are dealing with databases. In such cases, you should be using primitives to achieve speed and performance. They manipulate the bits directly which gives the max possible performance.

Submit "Java built-in data types (performance issues)" to Facebook Submit "Java built-in data types (performance issues)" to Digg Submit "Java built-in data types (performance issues)" to del.icio.us Submit "Java built-in data types (performance issues)" to StumbleUpon Submit "Java built-in data types (performance issues)" to Google

Tags: None Add / Edit Tags
Categories
Performance

Comments