方案A:动态铸造效果构架
List<String> MyList;
while(index<100) {
MyList = MyObject.get(MyIndex);
}
案例B:
List MyList;
while(index<100) {
MyList = (List<String>) MyObject.get(MyIndex);
}
哪上面会更快吗?
在情况B,我假设动态铸造发生在整个循环。所以,这是我的假设,第二个可能会比第一个慢。
请说哪一个能让我更快?