Skip to content

Commit

Permalink
Reduce the number of precompiled methods
Browse files Browse the repository at this point in the history
  • Loading branch information
brenhinkeller committed Feb 6, 2023
1 parent a83e97f commit 8f28018
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "NaNStatistics"
uuid = "b946abbf-3ea7-4610-9019-9858bfdeaf2d"
authors = ["C. Brenhin Keller"]
version = "0.6.22"
version = "0.6.23"

[deps]
IfElse = "615f187c-cbe4-4ef1-ba3b-2fcf58d6d173"
Expand Down
21 changes: 12 additions & 9 deletions src/precompile.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
@precompile_setup begin

MAXDIMS = 3

R = rand(10000)
x = [1:100..., 1]
y = [1:100..., NaN]
Expand All @@ -19,7 +21,7 @@
# nanpctile(Y, 50, dims=2)

for T in (Float64,)
for nd in 1:4
for nd in 1:MAXDIMS
A = ones(T, ntuple(i->10, nd))
nansum(A)
nanmean(A)
Expand All @@ -30,15 +32,16 @@
# nanmedian(A)
# nanpctile(A, 50)

for d in 1:nd
nansum(A, dims=d)
nanmean(A, dims=d)
nanstd(A, dims=d)
nanvar(A, dims=d)
nanminimum(A, dims=d)
nanmaximum(A, dims=d)
end
if nd > 1
for d in 1:nd
nansum(A, dims=d)
nanmean(A, dims=d)
nanstd(A, dims=d)
nanvar(A, dims=d)
nanminimum(A, dims=d)
nanmaximum(A, dims=d)
end

for i = 2:nd
for j = 1:i-1
nansum(A, dims=(j,i))
Expand Down

2 comments on commit 8f28018

@brenhinkeller
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register

Release notes:

  • Reduce the number of precompiled methods, to save space in .julia/compiled/ for users

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/77077

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.6.23 -m "<description of version>" 8f280188924757b8a00bf14c7c393174d2ee9892
git push origin v0.6.23

Please sign in to comment.