<p dir="auto">I feel like this a duplicate issue, but I could not find it. A little ironic I guess.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia&gt; @code_warntype match(r&quot;([M,G])([0-9.])+&quot;, &quot;foo&quot;)
Variables:
  r::Regex
  s::ASCIIString

Body:
  begin  # regex.jl, line 134:
      GenSym(2) = box(Int32,checked_trunc_sint(Int32,0))
      GenSym(8) = (top(getfield))(s::ASCIIString,:data)::Array{UInt8,1}
      return match(r::Regex,$(Expr(:new, :((top(getfield))(Core,:UTF8String)::Type{UTF8String}), :((top(convert))(Array{UInt8,1},GenSym(8))))),1,GenSym(2))::Union(RegexMatch,Void)
  end::Union(RegexMatch,Void)"><pre class="notranslate"><code class="notranslate">julia&gt; @code_warntype match(r"([M,G])([0-9.])+", "foo")
Variables:
  r::Regex
  s::ASCIIString

Body:
  begin  # regex.jl, line 134:
      GenSym(2) = box(Int32,checked_trunc_sint(Int32,0))
      GenSym(8) = (top(getfield))(s::ASCIIString,:data)::Array{UInt8,1}
      return match(r::Regex,$(Expr(:new, :((top(getfield))(Core,:UTF8String)::Type{UTF8String}), :((top(convert))(Array{UInt8,1},GenSym(8))))),1,GenSym(2))::Union(RegexMatch,Void)
  end::Union(RegexMatch,Void)
</code></pre></div>
<p dir="auto">This behavior is documented, but I feel like it should not be the default for performance reasons. This seems like a use case for <code class="notranslate">Nullable</code>s.</p>
<p dir="auto">I'm using a 32-bit Windows build (MinGW, source pulled 6-Aug-13) on Windows 8.</p>
<p dir="auto">I wanted to try out the new built-in profiler so, following the example in the manual, I defined myfunc.jl as:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="function myfunc()
    A = rand(100, 100, 200)
    max(A)
end"><pre class="notranslate"><code class="notranslate">function myfunc()
    A = rand(100, 100, 200)
    max(A)
end
</code></pre></div>
<p dir="auto">and ran the following</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia&gt; require(&quot;myfunc.jl&quot;)

julia&gt; @profile (for i=1:100; myfunc(); end)
@profile (for i=1:100; myfunc(); end)

julia&gt; Profile.print();
Profile.print();
         516 client.jl; _start; line: 372
          516 client.jl; run_repl; line: 166
             516 client.jl; eval_user_input; line: 91
                516 profile.jl; anonymous; line: 1
                   2  ...r\bin\myfunc.jl; myfunc; line: 2

julia&gt;"><pre class="notranslate"><code class="notranslate">julia&gt; require("myfunc.jl")

julia&gt; @profile (for i=1:100; myfunc(); end)
@profile (for i=1:100; myfunc(); end)

julia&gt; Profile.print();
Profile.print();
         516 client.jl; _start; line: 372
          516 client.jl; run_repl; line: 166
             516 client.jl; eval_user_input; line: 91
                516 profile.jl; anonymous; line: 1
                   2  ...r\bin\myfunc.jl; myfunc; line: 2

julia&gt;
</code></pre></div>
<p dir="auto">However, this doesn't look quite right, in particular all traces except two seem to vanish into thin air after profile.jl.</p>
<p dir="auto">Any ideas what's happening and/or how to debug it further?</p>