SQLite Forum

Type of the column
Login
I would say yes with the only caveat being if you are running on a physical machine that does not have a 64-bit ALU.  If the inherent ALU architecture is only 32-bit, for example, then retrieving a 32-bit integer and dealing only with 32-bit integers will be more efficient.  Similarly, if you are running on a 16-bit, 8-bit or 4-bit machine, then you probably want to truncate the value to the inherent ALU bit size as soon as possible.

There is, of course, a trade off in memory usage by using longer storage spaces than actually required -- but from the perspective of the CPU and the appurtenant pieces (RAM chips, controllers, etc) the "squishing" of the native hardware size into a smaller storage size is more costly that not doing that.

NB: ALU is the Arithmetic Logic Unit, which is the hardware sub-unit of the CPU that actually performs arithmetic and logic operations.

Note that this is hardware dependent.  There was a time when operating a CPU in 32-bit was more efficient than 64-bit because, even though the CPU was capable of 64-bit operation, it was really a 32-bit CPU using double-wide operations.

Modern hardware is inherently 64-bit or wider for the most part.