Why would you combine two 32 bit integers into a 64 bit integer? : <p>Recently I saw how a compiler combined two 32 bit integers which were values of properties of a class and stored them as a 64 bit integer. My question now is, why is this done? What advantages are there when combining integers?</p>

<p>for example if we had the following properties of a class</p>

<pre><code>class FooBar {
 int x = 1;
 int y = 100;
}
</code></pre>

<p>so instead of</p>

<pre><code>i32 = 00000001
i32 = 01100100
</code></pre>

<p>We get:</p>

<pre><code>i64 = 0000000101100100
</code></pre>

<p>Why would you combine them?</p>
