Can someone tell me which one is more efficient between List<int> and int[]. Because I am working on a project and as you might know efficiency is way so important concern now.
If you added some introductory note to your post, it’d be great tho 🙂
List<int>is a wrapper forint[]that resizes as needed. With JIT inlining, they should perform almost identically, but the JIT will have an easier time edging out the extra performance fromint[]because it’s a CLI primitive with dedicated IL instructions.