Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在某处读到有像 Objects Inlining 这样的优化。如果两个对象具有相同的生命周期范围并且它们之间有很多读取,则它将两个对象并置在一起。并且 GC 也将它们视为一个从一代转移到另一代。
但我没有在 java.sun.com 上找到任何关于此优化的提及,以确保 HotSpot 拥有它。
是的,它有。我亲自问过查理·亨特。