Skip to content

Commit

Permalink
Replace get! with get to avoid unnecessary state initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
bowenszhu committed May 6, 2024
1 parent e9a96bd commit 5320dd7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/code.jl
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ end

function cse_state!(state, t)
!iscall(t) && return t
state[t] = Base.get!(state, t, 0) + 1
state[t] = Base.get(state, t, 0) + 1
foreach(x->cse_state!(state, x), unsorted_arguments(t))
end

Expand Down

0 comments on commit 5320dd7

Please sign in to comment.