Counting from 1 to 1 billion in Python, using FOR, WHILE and the NUMPY library
Run the following command to install numpy:
pip install -r requirements.txt
Test case was using Python 3.11.3:
Windows 11 version 22H2 build 22621.1702:
The tests for both cases!
py .\using_for.py
30.90 seconds
py .\using_while.py
83.56 seconds
py .\using_numpy.py
1.46 seconds