Level 1 · Apprentice0 XP
Speed up Python with PyO3, run models with candle, tokenise fast, and ship to WebAssembly.
Step 1 / 6
ProblemAn AI team's data pipeline spends 80% of its time in one Python function that cleans and tokenises text. NumPy cannot vectorise it. In 'Making Python fast' you saw the rule: profile, vectorise, use processes, then go native. This lesson is the native step.
← → step
Before this: Making Python fast
🛠️ 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.Create a Python extension with maturin and PyO3 that cleans and counts tokens in a list of strings in parallel. Call it from Python, compare its speed with the pure-Python version on 1 million strings, and publish it as a local wheel.