Skip to content
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

Sort only upper tail weights #22

Merged
merged 4 commits into from
Dec 30, 2021
Merged

Sort only upper tail weights #22

merged 4 commits into from
Dec 30, 2021

Conversation

sethaxen
Copy link
Member

Fixes #20.

Benchmarks:

julia> using PSIS

julia> x1 = randn(1_000);

julia> x2 = randn(100, 1_000, 4);

Before this PR:

julia> @btime $psis($x);
  89.436 μs (7 allocations: 16.75 KiB)

julia> @btime $psis($x2);
  16.521 ms (1144 allocations: 6.24 MiB)

After this PR:

julia> @btime $psis($x);
  71.606 μs (10 allocations: 16.86 KiB)

julia> @btime $psis($x2);
  7.827 ms (1444 allocations: 6.25 MiB)

src/core.jl Outdated Show resolved Hide resolved
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@codecov-commenter
Copy link

codecov-commenter commented Dec 30, 2021

Codecov Report

Merging #22 (ba6bf0e) into main (ae98bab) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main      #22   +/-   ##
=======================================
  Coverage   97.06%   97.06%           
=======================================
  Files           8        8           
  Lines         307      307           
=======================================
  Hits          298      298           
  Misses          9        9           
Impacted Files Coverage Δ
src/core.jl 97.54% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ae98bab...ba6bf0e. Read the comment docs.

@sethaxen sethaxen merged commit 1af98ee into main Dec 30, 2021
@sethaxen sethaxen changed the title Sort only upper tail waits Sort only upper tail weights Jan 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Only sort the upper tail weights
2 participants