Skip to content

Add lucen (Concurrency and Parallelism)#3264

Open
soumik15630m wants to merge 1 commit into
vinta:masterfrom
soumik15630m:master
Open

Add lucen (Concurrency and Parallelism)#3264
soumik15630m wants to merge 1 commit into
vinta:masterfrom
soumik15630m:master

Conversation

@soumik15630m

Copy link
Copy Markdown

Project

lucen

Checklist

  • One project per PR
  • PR title format: Add lucen
  • Entry format: - [lucen](url) - Description ending with period.
  • Description is concise and short

Why This Project Is Awesome

Which criterion does it meet? (pick one)

  • Industry Standard - The go-to tool for a specific use case
  • Rising Star - 5000+ stars in < 2 years, significant adoption
  • Hidden Gem - Exceptional quality, solves niche problems elegantly

Explain:

lucen parallelizes existing CPU-bound Python for-loops without a rewrite: you mark a loop with two comments and run it. It does this under a guarantee that is rare in this space, that the parallel run is bit-identical to plain sequential Python, floats and container insertion order included. It only parallelizes loops it can prove are both safe and worthwhile, and otherwise runs them sequentially and reports why. The quality bar is unusually high: it is verified with differential and property testing, whole-program fuzzing, and TLA+ formal specifications for the privatize-and-commit protocol; it ships an optional Rust (PyO3/abi3) core with a guaranteed-identical pure-Python fallback; and it fully supports free-threaded (no-GIL) CPython 3.13/3.14, routing to real threads there.

How It Differs

Unlike multiprocessing/concurrent.futures/joblib (which require restructuring into pools, chunking, and pickling) or Numba (which JIT-compiles numeric bodies), lucen leaves your loop exactly as written and adds a hard correctness guarantee, bit-identical to sequential, enforced by construction and checked formally. It also routes by interpreter: processes on GIL builds, real threads on free-threaded builds. No other parallelizer in the list pairs "no code rewrite" with "provably identical results."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant