> For the complete documentation index, see [llms.txt](https://docs.cerebrum.dev/cerebrum/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cerebrum.dev/cerebrum/technology-stack/optimization.md).

# Optimization

Amdahl's Law is used extensively in our chosen task distribution architecture to predict the theoretical maximum speedup for a task when only part of the task can be parallelized. The speedup of a program using multiple processors in parallel computing is limited by the time needed for the sequential fraction of the program. Below is a detailed breakdown of the sequence diagram that integrates Amdahl’s Law into Cerebrum’s operating methodology:

<figure><img src="/files/jhMvOOqbCpKm1KbGSyp9" alt=""><figcaption><p>Logic Flow of Amdahs Law Integration</p></figcaption></figure>

**Evaluate Current Methods**

* Cerebrum to Amdahl's Law: Cerebrum Cloud initiates a review of current computational processes to identify potential areas for applying Amdahl’s Law.

**Application of Amdahl's Law**

* Loop (Applying speedup calculations): Cerebrum Cloud repeatedly applies Amdahl's Law to calculate the possible speedup by parallelizing different parts of operations. The formula used is:&#x20;

$$
S = \frac{1}{(1-P) + \frac{P}{N}}
$$

Where 𝑆 is the speedup, 𝑃 is the proportion of the program that can be parallelized, and N is the number of processors.

**Integrate Improvements**

* Cerebrum to System: From the calculation done, Cerebrum integrates improvements in system architecture or the processing pipeline to exploit parallel computing based on insight gained through Amdahl's Law.

**Confirm Integration Success**

* Cerebrum to Amdahl's Law (Confirmation): Cerebrum Cloud would then send a confirmation back to the theoretical framework of Amdahl's Law, thus completing the loop of integration.

**Performance Improvement Monitoring**

* Amdahl's Law to Cerebrum (Asynchronous Monitoring): As this is an ongoing process, monitoring is effected to ensure that the theoretical increase in speed is practically manifested.

<br>
