forked from JuliaLang/julia
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
findextrema
: compute findmin
and findmax
in single pass
This is a simple extension of extant `findmin` and `findmax` methods. Depending on context (cost of `f`; whether reduction is over dims; size of array) the speedup increase is somewhere between 1.0-1.6 (no regressions). Interestingly, I noticed but could not locate a `findextrema`; there is some [mention](JuliaLang#7327) of it, but nothing in Base. If it was deemed unworthy, please excuse this errant PR.
- Loading branch information
1 parent
5f256e7
commit b0dc058
Showing
6 changed files
with
294 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -468,6 +468,8 @@ export | |
findmin, | ||
findmin!, | ||
findmax!, | ||
findextrema, | ||
findextrema! | ||
findnext, | ||
findprev, | ||
match, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.