-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
extrema() is missing [,dims] #15376
Comments
Are you comparing performance on master or 0.4? |
the differences between master and 0.4 are negligible:
|
If you want to try implementing it, this blog post should get you well on your way. See also code in |
i've made four versions of i'm guessing CartestianRange is slow because of #9080. should i submit a PR for the functor version? note that this helps to resolve #3893. |
I'd focus on the CartesianRange version. The effect in #9080 is modest, but I bet you're seeing a big slowdown. In your gist, The easiest approach would be not to worry about repeating work on the |
thanks @timholy for the tip on type stability. since the |
maximum
,minimum
,unique
,sum
, etc. all have the option to reduce across dimensions, but notextrema
. the fastest i've come up with is:i feel there must be a way to combine the loop repetition inside the calls to
maximum
andminimum
, but i'm not even a white belt in Functor Fu. this, for example, is much slower:anyone got any better ideas? or should i submit a PR? thanks.
The text was updated successfully, but these errors were encountered: