Skip to content

Commit 6f927ec

Browse files
committed
Updated README file with instructions for running scripts
1 parent 053b289 commit 6f927ec

File tree

1 file changed

+28
-6
lines changed

1 file changed

+28
-6
lines changed

README.md

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# mandelbrot-scripts
22
Mandelbrot checksum scripts for benchmarking Python 3.14's free-threaded interpreter
33

4-
**Background:**
4+
### Background:
55

66
These scripts implement a CPU-intensive workload for calculating a checksum for a [Mandelbrot set](https://en.wikipedia.org/wiki/Mandelbrot_set).
77

8-
**Purpose:**
8+
### Purpose:
99

1010
These scripts were used to benchmark Python 3.14's new free-threaded interpreter against the classic GIL-enabled build for a CPU-bound workload.
1111

12-
**Files:**
12+
### Files:
1313

1414
Several versions of the benchmarking scripts were created to test out a sequential implementation, a multi-processing implementation, and a threaded implementation. A Bash driver script to automate testing and CPU cooldown cycles is also provided.
1515

@@ -19,10 +19,32 @@ The respective files are:
1919
* **mandelbrot_threading.py** --> an implementation using Python's standard threading library
2020
* **run_tests.sh** --> a Bash script to automate testing of each Python script against the GIL-enabled Python 3.14 interpreter as well as the free-threaded Python 3.14 interpreter
2121

22-
**Running the Code:**
22+
### Running the Code:
2323

24-
1. Ensure that your test system has [uv installed](https://docs.astral.sh/uv/getting-started/installation/)
25-
2. Clone this repo:
24+
1. Clone this repo:
2625
``` bash
2726
git clone https://github.com/Roturgo/mandelbrot-scripts.git
2827
```
28+
2. Change to the mandelbrot-scripts directory
29+
``` bash
30+
cd mandelbrot-scripts
31+
```
32+
3. Ensure that your test system has [uv installed](https://docs.astral.sh/uv/getting-started/installation/)
33+
4. Install the GIL-enabled and free-threaded interpreters
34+
``` bash
35+
uv python install cpython-3.14.0
36+
uv python install cpython-3.14.0t
37+
```
38+
5. (Optional) Verify successful installation
39+
``` bash
40+
uv python list
41+
```
42+
6. Sync and activate a python virtual environment to ensure installed python interpreters are in your shell's $PATH
43+
``` bash
44+
uv sync -U
45+
source .venv/bin/activate
46+
```
47+
7. Run the Bash script to automate testing and cooldown cycles
48+
``` bash
49+
bash ./run_tests.sh
50+
```

0 commit comments

Comments
 (0)