What should I do with the smaller ID item type? What is the maximum number of digits in Integer in the first place?
Integer 10 digits → Then, items with 9 digits or less are Integer.
Short 5 digits → Then, items with 4 digits or less are short.
byte 3 digits → Then, items with 2 digits or less are bytes.
If you think about it
It seems that Integer has the best performance, not limited to Java, on the current mainstream 32-bit / 64bit computers.
Certainly, I remember learning that kind of thing a long time ago.
So, I wonder if numbers that do not exceed the upper limit of Integer are defined by Integer.
reference: About Java integer types (long, int, short, byte) [int can be processed faster than short or byte](https://ja.stackoverflow.com/questions/39344/int can be processed faster than short or byte)
Recommended Posts