28 bytes for empty object/class instance?
<p>I did some benchmarks comparing performance of int vs Integer, long vs Long, empty class instance vs class instance with long value. </p>

<p>And I have few questions which I cannot answer myself:</p>

<ol>
<li>why instantiating of empty class or object takes 28 bytes?</li>
<li>instantiating of Long object takes 29 bytes, primitive long 8 bytes, so why the difference to empty class is only 1 byte? what kind of optimization is JVM doing?</li>
</ol>

<p>I used JDK1.6.0_30 on MacOS, and the code is available at 
<a href="https://github.com/mousator/benchmarks/blob/master/src/sk/emandem/michal/AutoboxingTypeBenchmark.java">https://github.com/mousator/benchmarks/blob/master/src/sk/emandem/michal/AutoboxingTypeBenchmark.java</a>
(you can checkout the whole project)</p>

<p>Thanks for answers!</p>
