Which one is more efficient : List or int[]

后端 未结 6 1143
伪装坚强ぢ
伪装坚强ぢ 2020-12-09 08:30

Can someone tell me which one is more efficient between List and int[]. Because I am working on a project and as you might know efficien

6条回答
  •  一向
    一向 (楼主)
    2020-12-09 08:45

    If you plan on using any features that a list would provide (searching, sorting, removing, resizing) then I would go with a list because chances are these functions are very optimized already and you won't be able to write better versions of them.

提交回复
热议问题