Skip to content

Commit b9b9c87

Browse files
committed
@mmcky edit of lecture wording
1 parent 57107b2 commit b9b9c87

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

lectures/numba.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -723,9 +723,10 @@ def calculate_pi_parallel(u_draws, v_draws):
723723
return area_estimate * 4 # dividing by radius**2
724724
```
725725

726-
As the exercise statement suggests, parallelization pays off when each thread
727-
has a substantial amount of work to do, so we draw a fresh, much larger set of
728-
points rather than reusing the arrays from above.
726+
Parallelization pays off when each thread has enough work to overcome the overhead costs while
727+
breaking the problem into parts for work to happen simultaneously.
728+
729+
Lets draw a fresh, much larger set of points rather than reusing the arrays from above.
729730

730731
```{note}
731732
The two arrays below occupy about 1.6 GB of memory — reduce `n` if your
@@ -773,9 +774,7 @@ as arrays, so the parallel loop only *reads* from memory.
773774

774775
Drawing the points *inside* the parallel loop instead is surprisingly delicate.
775776

776-
777-
We investigate why, and how to do it safely, in
778-
{ref}`numba_ex_race`.
777+
We investigate why, and how to do it safely, in {ref}`numba_ex_race`.
779778

780779
```{solution-end}
781780
```

0 commit comments

Comments
 (0)