Using Short over Int

Is there any noticable benefit to using the short data type instead of an int? Would their be any performance increase or anywhere where they behave differently?

Well the short takes 16 bits of memory, while an int takes 32. But I think that the int will run faster as the CPU is designed to work with such values. It has to mask the first 16 bits to work with a short, which is a slight overhead.

Memory-wise though, a short will take half the space of an int. So if memory is a concern, a short may be interesting.

But honestly, I just like to stick with int. I don’t think you will be optimizing anything noticeable in most situations by using a short.