Since #550, the Exercises section opens with a shared setup block that draws u_draws and v_draws at n = 1_000_000 so the samples can be reused by both {ref}speed_ex1 and {ref}numba_ex3.
The statement of numba_ex3 still ends with: "For the size of the Monte Carlo simulation, use something substantial, such as n = 100_000_000." The provided solution then uses the shared 10^6 arrays, so it appears to ignore the exercise's own instruction — and at 10^6 the parallel gain over the serial version is modest, which undercuts the point the exercise is making.
Two possible fixes:
- Soften or drop the
n = 100_000_000 sentence in numba_ex3 and point readers at numba_ex_draw_speed, which already does the large-n comparison end-to-end.
- Keep the sentence and add a line to the solution noting that the shared
n keeps runtime and memory low, and that scaling up means regenerating the arrays (memory grows at roughly 16n bytes, about 1.6 GB at 10^8).
Origin: flagged by Copilot review on the zh-cn sync PR QuantEcon/lecture-python-programming.zh-cn#70. The translated text mirrors the English source verbatim, so the fix belongs here and will propagate to all editions through translation sync.
Since #550, the Exercises section opens with a shared setup block that draws
u_drawsandv_drawsatn = 1_000_000so the samples can be reused by both {ref}speed_ex1and {ref}numba_ex3.The statement of
numba_ex3still ends with: "For the size of the Monte Carlo simulation, use something substantial, such asn = 100_000_000." The provided solution then uses the shared 10^6 arrays, so it appears to ignore the exercise's own instruction — and at 10^6 the parallel gain over the serial version is modest, which undercuts the point the exercise is making.Two possible fixes:
n = 100_000_000sentence innumba_ex3and point readers atnumba_ex_draw_speed, which already does the large-ncomparison end-to-end.nkeeps runtime and memory low, and that scaling up means regenerating the arrays (memory grows at roughly16nbytes, about 1.6 GB at 10^8).Origin: flagged by Copilot review on the zh-cn sync PR QuantEcon/lecture-python-programming.zh-cn#70. The translated text mirrors the English source verbatim, so the fix belongs here and will propagate to all editions through translation sync.