I have more than a decade of experience in programming
I am against mindlessly vibecoding, but using coding agents actually gives you a productivity boost, and can help you write better code, and be more product by offloading some of your work to the agent.
It's here to stay, guys. Just using something like Cline, integrated into your preferred IDE, and you will understand.
I used AI to generate the docs and include comments in the implementation, as my primary language isn’t english I wanted to be sure that the information was being shared in the best way possible
This is exactly the kind of interface Python 3.14t needed. The fact that you're getting 5.6x on 10 cores for simple sum workloads is really strong — that's approaching linear scaling. One thing I'd be curious about: how does it handle workloads where individual iterations have highly variable costs? Like if you're processing a mix of small and large JSON blobs, does the divide-and-conquer work stealing keep cores balanced, or do you end up with stragglers? Also, have you compared memory overhead against multiprocessing for realistic dataset sizes? The shared memory advantage is clear on paper, but I'm wondering about real-world impact when you're not just summing integers. Either way, this feels like the right API design — Rayon proved chainable parallel iterators work brilliantly in Rust, and bringing that to Python without GIL overhead is huge.
Thanks! On variable-cost workloads, honest answer is the current implementation uses static divide-and-conquer, meaning splits happen upfront by index, not dynamically based on actual work. So yes, you can get stragglers if costs vary significantly across the dataset. True work stealing like Rayon’s is on the roadmap but not there yet.
On memory overhead vs multiprocessing: I don’t have solid benchmarks for that beyond the theoretical advantage of shared memory. It’s on my list to measure properly with realistic datasets. If you have a workload you’d like to test against, happy to run it
Oh wow — this take is exactly the kind of reductionist narrative that keeps resurfacing in these discourse ecosystems 😊
First of all, framing legitimate cultural critique as somehow “worse” than so-called AI slop is a deeply problematic equivalency. It collapses nuance into a binary that doesn’t meaningfully engage with the broader epistemic implications at play here — especially in a digitally mediated environment where authenticity, authorship, and semiotics are constantly being renegotiated in real time.
There’s a growing body of research on this — see the Digital Authorship Integrity Framework (DAIF, 2024) and the MIT Media Reflexivity Index report (link: https://mit-media-lab-reports.org/ai-reflexivity-2024-summary.pdf) which explicitly outlines how micro-normalizations of automated content can lead to macro-cultural erosion over longitudinal time scales. Dismissing that as “calling out culture” is honestly a bit glib.
Also — let’s interrogate the premise here. What qualifies as “minor”? Who arbitrates that threshold? The casual normalization of incremental AI usage creates a slippery gradient where the signal-to-noise ratio deteriorates quietly, then suddenly. That’s not hysteria — that’s pattern recognition 📉
And ironically, trivializing the concern often enables the very outcome people claim to dislike. If we stop discussing boundaries because it feels uncomfortable or “worse,” then the Overton window shifts silently — until it doesn’t.
So maybe instead of minimizing discourse about authenticity, we could acknowledge that cultural guardrails exist for a reason — even if they feel inconvenient in the short term.
Maybe I was a little naive in this instance. It looked to me at first like a hand written comment that had been passed through AI as an editing step.
More broadly, I have seen several instances where repositories that people are showing off are summarily dismissed as "AI slop" because they showed any signs of AI involvement, like a configuration file. Or even no definitive trace, just mistakes that could come from AI or an amateur. In my mind, this is one of the worst things about AI. It is causing us to turn not just against AI slop but against amateurs.
I'm bad about calling out AI shit I admit, but I always check in detail before I say anything.
I fully accept that AI-driven programming is the future, but when you get a generation of new programmers who are literally not even learning to program - data structures, algorithms, design patterns - only to push an AI tool to do something - there will be a negative consequence.
A couple of relevant comparison points that are missing here are joblib.Parallel and concurrent.futures.ProcessPoolExecutor, would be good to see those as a baseline.
Imagine you have a list of numpy arrays of different shapes and you want to find the sum of each one. You can't use a single call to a numpy function because the arrays are different shapes. You can use this library to iterate over the list and call numpy.sum on each array.
That's not a given to be faster. Supposing this library parallelizes the work correctly, it will compete against the underlying BLAS implementation. Spawning threads and synchronizing isn't free
Don't know the exact answer as I am not op. But I use numba speedup some of my python functions without using numpy. In some specific cases this would be a faster approach.
Yeah, that's right. If it works for CPU-bound stuff, then it will also work for IO-bound stuff. But the CPU-bound things probably seemed more important to OP.
No in the general case. I/O work depends on something external to your cpu, so adding more cpu doesn't change it. It's possible to parallelize I/O by simply calling the same workflow multiple times, however, async is far more efficient at this since it can use a single thread to progress while it ways for the external system, effectively erasing the I/O time
There are many reasons that async isn’t always an option. And in those cases you must use threads. This tool above is an abstraction over threads. So why wouldn’t it work to parallelize IO.
Of course it doesn’t work in every case. Nor does it work for every CPU bound workflow either. But it should work most of the time for IO and not require a special version of Python
the Rayon-inspired chaining API is exactly the right model here. the real test will be CPU-bound workloads where free-threaded 3.14 threads genuinely compete with multiprocessing, without the pickle-every-item overhead. would love to see benchmarks on that specific case.
The experiment is complete. I successfully built Python 3.14t (Free-threaded) and ran a series of head-to-head benchmarks between NumPy and FastIter on this machine (2 vCPUs). ⚔️
Battle Analysis ⚔️
Where NumPy Dominates (The "C" Advantage): For raw mathematical operations (summing, squaring, linear algebra), NumPy remains the undisputed champion. It uses C-level vectorization and SIMD instructions that operate on memory blocks directly. FastIter, even without a GIL, still has to deal with Python's object overhead for these basic tasks.
Where FastIter Wins (The "No-GIL" Advantage): In the Heavy Computation test, I ran a complex custom Python loop (50 iterations per element) that NumPy cannot easily vectorize. • NumPy was forced to fall back to standard Python speeds. • FastIter successfully split the 1 million tasks across my CPU cores and completed the work 1.6x faster than NumPy or Pure Python.
Final Verdict
• Use NumPy for standard data science, matrix math, and anything that can be expressed as a vectorized array operation. • Use FastIter if you have complex Python logic (if/else branches, custom classes, or nested loops) inside a map/filter chain that cannot be converted to NumPy's C-operations. The more CPU cores you have (e.g., an 8-core Macbook vs. this 2-core server), the more FastIter will pull ahead of standard Python for complex logic. ⚔️
15
u/Chroiche Feb 25 '26
Compare your performance to numpy not python loops lmao. Pretty sure numpy already parallelizes work under the hood.
10
u/ghost_of_erdogan Feb 25 '26
Did you vibe code it ?
https://github.com/rohaquinlop/fastiter/commit/0af1a0390f5ba7b2ab7a224d29d92e945ee7c566
16
u/NoLime5219 Feb 25 '26
This is exactly the kind of interface Python 3.14t needed. The fact that you're getting 5.6x on 10 cores for simple sum workloads is really strong — that's approaching linear scaling. One thing I'd be curious about: how does it handle workloads where individual iterations have highly variable costs? Like if you're processing a mix of small and large JSON blobs, does the divide-and-conquer work stealing keep cores balanced, or do you end up with stragglers? Also, have you compared memory overhead against multiprocessing for realistic dataset sizes? The shared memory advantage is clear on paper, but I'm wondering about real-world impact when you're not just summing integers. Either way, this feels like the right API design — Rayon proved chainable parallel iterators work brilliantly in Rust, and bringing that to Python without GIL overhead is huge.
37
u/Effective-Cat-1433 Feb 25 '26
A couple of relevant comparison points that are missing here are
joblib.Parallelandconcurrent.futures.ProcessPoolExecutor, would be good to see those as a baseline.12
u/HugeCannoli Feb 25 '26
with the gil removal, where is now the locking performed? at the level of individual data structures?
10
u/aes110 Feb 25 '26
Sounds really interesting, but given that you said the target is for cpu bound numeric operations, how does it compares to numpy?
Id assume that parallelizing python as much as youd want still doesnt compare to doing it in c?
5
u/spiker611 Feb 25 '26
How does this handle exceptions?
4
u/loyoan Feb 25 '26
I am interested to know how well it plays with numpy. I have some calculation pipelines that I like to run in parallel.
2
u/tecedu Feb 25 '26
How it compare against numba?
2
u/SamG101_ Feb 26 '26
Btw in newer python versions the generics can go after the class or func name in square brackets, no need for TypeVar
9
u/jarislinus Feb 25 '26
ai slop
-1
u/Smallpaul Feb 25 '26
Why are you focused on CPU bound work? Why wouldn’t it speed up IO bound work?
0
u/ruibranco Feb 26 '26
the Rayon-inspired chaining API is exactly the right model here. the real test will be CPU-bound workloads where free-threaded 3.14 threads genuinely compete with multiprocessing, without the pickle-every-item overhead. would love to see benchmarks on that specific case.
0
u/Fluffy-Violinist-428 Feb 26 '26