Can using non primitive Integer/ Long datatypes too frequently in the application, hurt the performance??
- by Marcos
I am using Long/Integer data types very frequently in my application, to build Generic datatypes. I fear that using these wrapper objects instead of primitive data types may be harmful for performance since each time it needs to create objects which is an expensive operation. but also it seems that I have no other choice(when I have to use primtives with generics) rather than just using them.
However, still it would be great if you can suggest if there is anything I could do to make it better. or any way if I could just avoid it ??
Also What may be the downsides of this ?
Suggestions welcomed!