Lecture 4
Performance Evaluation
1. Why Performance Evaluation is Necessary
o Understanding the performance of algorithms is crucial for selecting
the most appropriate one for a given problem. It helps in making
informed decisions about algorithm design and optimization.
2. Steps in Performance Evaluation
o Specify: Define what the program should do.
o Design: Select appropriate algorithms and data structures with
consideration for effectiveness and efficiency.
o Code: Implement the solution.
o Evaluate: Assess the program's performance against
specifications.
Creating Efficient Programs
1. Steps to Create Efficient Programs
o Pick the Best Algorithm & Data Structure: Choose the most
suitable algorithm and data structure for the problem.
o Implement the Algorithm Simply: Focus on a straightforward
implementation.
o Identify Bottlenecks: Find parts of the code that hinder
performance.
o Optimize Relevant Parts: Focus on optimizing the critical sections
rather than premature optimization.
o Avoid Unnecessary Complexity: Use complex algorithms only
when necessary.