Loading lesson…
Level 1 · Apprentice0 XP
The GIL, processes, vectorisation, profiling, and when to reach for Rust.
Step 1 / 6
ProblemA pure-Python tokeniser processes a 2 GB corpus in an hour, using one CPU core while seven stay idle.
← → step
Before this: From notebook to real project
🛠️ Your turn
Reading is not the skill, doing is. Try for ten minutes before you open the hint. Getting stuck first is what makes the solution stick.
1.Profile a slow text-cleaning job with py-spy, vectorise or batch what you can, run the rest with ProcessPoolExecutor, and record the time after each step. Optionally move the hottest function to Rust with PyO3 and maturin.