Number of digits in numeric item

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

Number of digits in numeric item
Count the number of digits after the decimal point in Java
Count the number of occurrences of a string in Ruby
Set the maximum number of characters in UITextField in RxSwift
Can the number of digits be Math.log10 (x) .floor + 1?
Rails sorting function implementation (displayed in order of number of like)
A program that counts the number of words in a List
Find the number of days in a month with Kotlin
Implementation of gzip in java
Judgment of fractions in Ruby
Pitfalls of WebTarget.queryParam () in JAX-RS
Implementation of HashMap in kotlin
{The first consecutive 10-digit prime number in the value of e} .com
Form that receives the value of the repeating item in Spring MVC
Simplified version of number calculation by collecting information in an instance