Skip to content

Commit ae6c92c

Browse files
authored
Fix the inference error by removing assume_effects (#245)
1 parent 39b51f9 commit ae6c92c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

GeometryOpsCore/src/apply.jl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,9 +343,12 @@ using Base.Threads: nthreads, @threads, @spawn
343343
return mapreduce(fetch, vcat, tasks)
344344
end
345345
#=
346-
Here we use the compiler directive `@assume_effects :foldable` to force the compiler
346+
Here we used to use the compiler directive `@assume_effects :foldable` to force the compiler
347347
to lookup through the closure. This alone makes e.g. `flip` 2.5x faster!
348+
349+
But it caused inference to fail, so we've removed it. No effect on runtime so far as we can tell,
350+
at least in Julia 1.11.
348351
=#
349-
Base.@assume_effects :foldable @inline function _maptasks(f::F, taskrange, threaded::_False)::Vector where F
352+
@inline function _maptasks(f::F, taskrange, threaded::_False)::Vector where F
350353
map(f, taskrange)
351354
end

0 commit comments

Comments
 (0)