Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Benchmark

Script to compare performance across different computers

This Python script generates all prime numbers up to 50 million and measures how long the computation takes.

prime_numbers.py

🎯 Purpose and Usefulness

Performance testing: Demonstrates how long it takes to compute primes with a simple algorithm.

Benchmarking: Can be used to compare performance across different computers, Python versions, or optimization techniques.