Skip to content

cmatver-2/Parallel-Prime-Number-Computation-Performance-Analysis

 
 

Repository files navigation

This project demonstrates the concept of parallelism in CPU-bound tasks by computing prime numbers within a large numeric range using three different execution models: sequential execution, multithreading, and multiprocessing. The primary objective is to analyze and compare the performance of each approach and understand how parallel computing can improve processing speed for computationally intensive workloads.

The program calculates prime numbers in a specified range and measures the execution time required for each method. By comparing the results, the project highlights the limitations of Python threading due to the Global Interpreter Lock (GIL) and shows how multiprocessing can provide better performance for CPU-heavy operations.

The implementation follows a modular structure where the prime-checking logic is separated from the execution models. The sequential, threading, and multiprocessing versions all use the same core algorithm to ensure fair comparison. The program records execution times, calculates performance speedup, and displays the results for analysis.

Key concepts demonstrated in this project include CPU-bound computation, task parallelism, performance benchmarking, and the practical impact of Python’s concurrency mechanisms.

Technologies used in this project include Python along with standard libraries such as time, threading, and multiprocessing.

This project was developed as part of a coursework assignment to explore parallel processing concepts and evaluate different approaches for improving computational performance in Python.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 100.0%