Explain the trade-offs of using different data structures in a codebase and how they affect performance.