Which one faster everytime read from concurrent hashmap or assign to variable then use it?

后端 未结 0 1202
半阙折子戏
半阙折子戏 2020-12-04 16:56

I have following two types of codes. I just want to know which approach will give me better performance ?

Code 1 :

    listModel.getStockList().forEach         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题