Usage of 'short' in C++ -


Why is it that for any numerical input we prefer an int instead of a small number, even if the input is too much Integer

The size of at least 2 bytes for int on my x86 and 4 bytes should not be better and faster to allocate to int?

Or am I confused to say that less is not used?

The CPU is usually the fastest while working with its "basic" integer shape, even if small is smaller than a int , int is probably close to the original size of a register in your CPU, and therefore the two being the most efficient is likely to.

In 32-bit CPU architecture, a bus cycle is required to load all bits to load 32-bit values. To load 16-bit values, a bus cycle is required to load bits, throwing plus out of half of them (this operation can still be within a bus cycle) .


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -