# How do I make this allocation free?

**URL:** <https://discourse.julialang.org/t/how-do-i-make-this-allocation-free/93306>\
**Category:** New to Julia\
**Created:** [January 21, 2023, 11:48am UTC](https://discourse.julialang.org/t/how-do-i-make-this-allocation-free/93306 "2023-01-21T11:48:29Z")\
**Posts on this page:** 1\
**Showing post:** 18

<div class="post-metadata">

**Author:** ![uniment](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/uniment/32/24532_2.png) [@uniment](https://discourse.julialang.org/u/uniment)\
**Post date:** [January 21, 2023, 11:40pm UTC](https://discourse.julialang.org/t/how-do-i-make-this-allocation-free/93306/18 "2023-01-21T23:40:08Z")

</div>

Seems related:

> [@Range (statistics)](https://discourse.julialang.org/t/range-statistics/92518/13):
>
> Can you take a look at Base.extrema and see if you can tell what, if anything, is wrong with it, performance-wise? Because I really think the right approach is to use extrema for this, and fix any problems there.

TLDR: performance of `maximum` has a lot of room for improvement, and there is an [ongoing effort](https://github.com/JuliaLang/julia/pull/45581) to fix it.

---

_[View the full topic](https://discourse.julialang.org/t/how-do-i-make-this-allocation-free/93306)._
