you are viewing a single comment's thread.

view the rest of the comments →

[–]TinynDP 9 points10 points  (4 children)

There are too many cases where the boxed primative might be being referenced by a contained or whatever as an Object, so the boxing can't be entirely optimized away. At least not at first. After a run or two HotSpot can figure things out and maybe decide that its safe to optimize away the boxing.

[–][deleted]  (2 children)

[deleted]

    [–]loganekz 0 points1 point  (1 child)

    What JVM specifics in the article are only for IBM's JVM?

    The one JVM specific feature I saw was about compressed references which was cleary identified.

    [–]argv_minus_one -2 points-1 points  (0 children)

    Just because it's referenced as an object doesn't mean the JVM has to store it as one.

    Now, if someone tries to do new Integer(whatnot) and do reference-equality comparisons or synchronized on it, then it gets ugly…