# What does "deoptimized" mean (in Cthulhu.jl)?

**URL:** <https://discourse.julialang.org/t/what-does-deoptimized-mean-in-cthulhu-jl/66048>\
**Category:** Internals & Design\
**Created:** [August 8, 2021, 11:22pm UTC](https://discourse.julialang.org/t/what-does-deoptimized-mean-in-cthulhu-jl/66048 "2021-08-08T23:22:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![goretkin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/goretkin/32/167_2.png) [@goretkin](https://discourse.julialang.org/u/goretkin)\
**Post date:** [August 8, 2021, 11:22pm UTC](https://discourse.julialang.org/t/what-does-deoptimized-mean-in-cthulhu-jl/66048/1 "2021-08-08T23:22:21Z")

</div>

I don’t have a small MWE to generate it, but I occasionally see “deoptimized” in the menu of Cthulhu.jl, e.g.

```julia
Advanced: dump [P]arams cache.
   %3 = invoke alias_continue(…,…,…)::Any
   %4 = call #!(::Any)::Any
   %25 = invoke push!(::typename(DiscretePathSearch.NodeHandle){…},::typename(DiscretePathSearch.NodeAugmentation){…})::Any
   %31 = invoke throw_inexacterror(::Symbol,::Type{Int32},::Int64)::Union{}
   %40 = invoke error(::String)::Union{}
   %56 = invoke alias_tally!(…,…,…)::Any
   %78 = call ArgumentError(::String)::Any
   %115 = invoke throw_inexacterror(::Symbol,::Type{UInt64},::Int64)::Union{}
 • %133 = deoptimized successors!(::typename(DiscretePathSearch.PathAndSummary){…},::typename(DiscretePathSearch.Algorithm){…})::Any

```

What does this mean? I tried searching for “deoptimized” (in Julia and in Cthulh) and I cannot even see what code emits it.

I opened [an issue](https://github.com/JuliaDebug/Cthulhu.jl/issues/213) to document it, but figured I should ask here too, since its meaning is not Cthulhu specific

---

<div class="post-metadata">

**Author:** ![melonedo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/melonedo/32/15503_2.png) [@melonedo](https://discourse.julialang.org/u/melonedo)\
**Post date:** [August 10, 2021, 8:12am UTC](https://discourse.julialang.org/t/what-does-deoptimized-mean-in-cthulhu-jl/66048/2 "2021-08-10T08:12:16Z")

</div>

IIRC, Cthulhu.jl works based on `@code_typed`, and if you check its documentation, `@code_typed optimize=false/true foo(a,b)` corresponds to (de)optimize options in `@descend foo(a,b)`.
