FORKS? POOLS? ASYNC? Solving Wordle with Python’s concurrency tools
summary
Builds a Python Wordle solver/statistics bot and measures real performance: uses concurrent.futures with thread pools (no GIL win), process pool speedup ~4.8x by moving scoring into separate processes, and chunking to reduce IPC. Benchmarks: single-thread ~185s for first guess, process pool ~38s, random solver ~90% success, exhaustive solver hits ~96% (hard mode lower, plurals removed boosts to ~97.5%). Experiments with nogil show promise but currently nogil currently ~1.6x slower on threaded workloads; code and datasets (Wordle, Wordlebot, answer list) are exercised end to end.
AI-written summary · about
chapters (7)
- 0:00Start
- 12:30Making a guess
- 13:43One code simplification
- 17:31Processes
- 20:18Inter-process communication
- 23:27pyenv install nogil-3.9.10-1
- 28:24Hard mode
related talks
44mSolving Wordle with Python & Selenium - & then running it in GitHub Actions
30mParallel computing in Python: Current state and recent advances
30mSpeed Up Your Data Processing
27m"Python’s tale of concurrency"
44mWorking Around the GIL with asyncio
35mWriting robust, readable, and maintainable concurrent programs in Python
30mPython Serialization and the Hallows of Parallel Computing
30mBuilding a NoGIL Load Balancer in 30 minutes
