# NCDatasets: performance issues deriving fast Minimum Maximum value as too slow

**URL:** <https://discourse.julialang.org/t/ncdatasets-performance-issues-deriving-fast-minimum-maximum-value-as-too-slow/118468>\
**Category:** Geo\
**Tags:** performance, netcdf, ncdatasets\
**Created:** [August 21, 2024, 10:51pm UTC](https://discourse.julialang.org/t/ncdatasets-performance-issues-deriving-fast-minimum-maximum-value-as-too-slow/118468 "2024-08-21T22:51:19Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [August 21, 2024, 10:59pm UTC](https://discourse.julialang.org/t/ncdatasets-performance-issues-deriving-fast-minimum-maximum-value-as-too-slow/118468/8 "2024-08-21T22:59:58Z")

</div>

It runs almost instantaneously (\< 0.1 seconds) for me, even in global scope:

```julia
julia> Output = Array{Union{Missing,Float32}}(rand(Float32, 291,313,31));

julia> @time Pmin, Pmax = extrema(x for x ∈ skipmissing(Output) if !isnan(x))
  0.053098 seconds (45.14 k allocations: 3.076 MiB, 57.64% compilation time)
(5.9604645f-8, 0.99999994f0)

```

Can you give a minimal working example (MWE) of code that reproduces your problem? See also [Please read: make it easier to help you](https://discourse.julialang.org/t/please-read-make-it-easier-to-help-you/14757)

PS. I’ve moved this to a new thread, since it is unrelated to the problem in the original thread. Please don’t “necropost” to ancient threads.

---

_[View the full topic](https://discourse.julialang.org/t/ncdatasets-performance-issues-deriving-fast-minimum-maximum-value-as-too-slow/118468)._
