Add lucen (Concurrency and Parallelism)#3264
Open
soumik15630m wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Project
lucen
Checklist
Add lucen- [lucen](url) - Description ending with period.Why This Project Is Awesome
Which criterion does it meet? (pick one)
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."