# Improving Base.mapreduce by 20% on vectors

**URL:** <https://discourse.julialang.org/t/improving-base-mapreduce-by-20-on-vectors/134478>\
**Category:** Performance\
**Tags:** performance, pluto, mapreduce\
**Created:** [December 10, 2025, 4:43pm UTC](https://discourse.julialang.org/t/improving-base-mapreduce-by-20-on-vectors/134478 "2025-12-10T16:43:34Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![adienes](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adienes/32/37459_2.png) [@adienes](https://discourse.julialang.org/u/adienes)\
**Post date:** [December 10, 2025, 4:52pm UTC](https://discourse.julialang.org/t/improving-base-mapreduce-by-20-on-vectors/134478/2 "2025-12-10T16:52:35Z")

</div>

looks like a fun experiment!

you may be interested in this thread: [Performance challenge: can you write a faster sum?](https://discourse.julialang.org/t/performance-challenge-can-you-write-a-faster-sum/130456)

and there are lots of benchmarks in the associated PR [WIP: The great pairwise reduction refactor by mbauman · Pull Request #58418 · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/pull/58418)

the most challenging part here is getting (as) uniform (as possible) speedups across all array types, shapes, sizes, element types, computer architectures, etc.

for example, a change to `mapreduce` that makes it 20% faster on `Array{Float64}` might accidentally cause 10x regressions on a `ReshapedArray{BigInt, 2, SubArray{...}}` (not particularly that type, just made something up for dramatic effect)

---

_[View the full topic](https://discourse.julialang.org/t/improving-base-mapreduce-by-20-on-vectors/134478)._
