Skip to content

Fix corner cases and short-circuit mapreduce - #302

Draft
jishnub wants to merge 4 commits into
masterfrom
jishnub/mapreduce
Draft

Fix corner cases and short-circuit mapreduce#302
jishnub wants to merge 4 commits into
masterfrom
jishnub/mapreduce

Conversation

@jishnub

@jishnub jishnub commented Oct 19, 2023

Copy link
Copy Markdown
Member

Addresses certain cases (min/max, and possibly some others) from #301

After this,

julia> C = Fill(1,10000000)
10000000-element Fill{Int64}, with entries equal to 1

julia> @btime mapreduce(identity, max, $(Ref(C))[])
  2.950 ns (0 allocations: 0 bytes)
1

Also fixes certain corner cases to make the reductions consistent with those for Arrays.

cc: @putianyi889

@codecov

codecov Bot commented Oct 19, 2023

Copy link
Copy Markdown

Codecov Report

Merging #302 (831933f) into master (fef31cd) will increase coverage by 0.00%.
Report is 5 commits behind head on master.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #302   +/-   ##
=======================================
  Coverage   99.88%   99.89%           
=======================================
  Files           7        7           
  Lines         871      940   +69     
=======================================
+ Hits          870      939   +69     
  Misses          1        1           
Files Coverage Δ
src/FillArrays.jl 100.00% <100.00%> (ø)
src/fillalgebra.jl 100.00% <100.00%> (ø)
src/fillbroadcast.jl 100.00% <100.00%> (ø)
src/oneelement.jl 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@jishnub
jishnub marked this pull request as draft October 19, 2023 14:32
@putianyi889

putianyi889 commented Oct 19, 2023

Copy link
Copy Markdown
Contributor

Can you use === to check if the types are consistent?

@jishnub

jishnub commented Oct 20, 2023

Copy link
Copy Markdown
Member Author

Looks like InfiniteLinearAlgebra is depending on the incorrect behaviour through BlockBandedMatrices, perhaps inadvertently.

@dlfivefifty

Copy link
Copy Markdown
Member

It looks like downstream breakage is extensive. I believe you that these packages might be depending on buggy behaviour but we should fix them before merging this.

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.

3 participants