1. EDD Challenge: The Hidden Cost of Inefficient Code
The exponential growth of data volumes (Big Data) and the massive use of data centers pose a major energy challenge. A poorly designed algorithm with high complexity (for example, in O(n2) instead of O(n log n)) unnecessarily overloads processor units (CPU) for excessive durations, leading to direct electricity overconsumption and premature wear of hardware infrastructure.
2. Interactive Performance Benchmark
Generate a random array of large size and directly compare the execution time between a quadratic sorting algorithm (selection sort) and an efficient sorting algorithm (merge sort). Observe the direct impact on your machine's processor.
Selection Sort (O(n2))
- ms
Merge Sort (O(n log n))
- ms
3. Assigned Work (Exam Questions / Project)
- Theoretical Analysis: Recall the definition of worst-case time complexity for selection sort and merge sort.
- Python Implementation: Write the merge sort function recursively.
- Energy Evaluation: If a web server executes 1 million requests per day requiring a sort on 10,000 elements, calculate the processor time saving ratio when switching from a quadratic algorithm to a logarithmic algorithm. Deduce the relevance of software ecodesign.