-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This implements `Statistics.median` based on the existing bitonic sorting, avoiding unnecessary allocation. While it is generally suboptimal to sort the whole array, the compiler manages to skip some branches since only the middle element(s) are used. Thus `median` is generally faster than `sort`. Using a dedicated median selection network could yield better performance and might be considered for future improvement.
- Loading branch information
Showing
3 changed files
with
37 additions
and
2 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
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