Skip to content

Commit 022008b

Browse files
committed
Use a lower level API to get more speed up
```julia julia> @time alias_elimination(sysEx); 1.130002 seconds (6.42 M allocations: 346.369 MiB, 12.44% gc time) ```
1 parent db05a03 commit 022008b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/systems/alias_elimination.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,10 @@ function alias_elimination!(state::TearingState; kwargs...)
151151
k === nothing && break
152152
end
153153
end
154+
subfun = Base.Fix2(substitute, subs)
154155
for ieq in eqs_to_update
155-
eqs[ieq] = substitute(eqs[ieq], subs)
156+
eq = eqs[ieq]
157+
eqs[ieq] = subfun(eq.lhs) ~ subfun(eq.rhs)
156158
end
157159

158160
for old_ieq in to_expand

0 commit comments

Comments
 (0)