<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia&gt; @code_warntype (Int ∘ identity)(1)"><pre class="notranslate"><code class="notranslate">julia&gt; @code_warntype (Int ∘ identity)(1)
</code></pre></div>
<p dir="auto">gives</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Variables:
  #self#::getfield(Base, Symbol(&quot;##57#58&quot;)){DataType,typeof(identity)}
  x::Tuple{Int64}

Body:
  begin
      return ((Core.getfield)(#self#::getfield(Base, Symbol(&quot;##57#58&quot;)){DataType,typeof(identity)}, :f)::DataType)((Core.getfield)(x::Tuple{Int64}, 1)::Int64)::Any
  end::Any"><pre class="notranslate"><code class="notranslate">Variables:
  #self#::getfield(Base, Symbol("##57#58")){DataType,typeof(identity)}
  x::Tuple{Int64}

Body:
  begin
      return ((Core.getfield)(#self#::getfield(Base, Symbol("##57#58")){DataType,typeof(identity)}, :f)::DataType)((Core.getfield)(x::Tuple{Int64}, 1)::Int64)::Any
  end::Any
</code></pre></div>
<p dir="auto">Similar, when <code class="notranslate">Int</code> is replaced by another type.</p>
<p dir="auto">There seems to be a performance regression in fft as demonstrated below:</p>
<p dir="auto">slowdown2.jl</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="function ch(nsteps, u)
    w = complex(u)

    p = plan_fft!(w)
    q = plan_ifft!(w)

    for n in 1:nsteps
        w = p*w
        w = q*w
    end
    w
end

srand(1)
u = rand(2^16)
ch(5, u)
@time ch(100, u)"><pre class="notranslate"><code class="notranslate">function ch(nsteps, u)
    w = complex(u)

    p = plan_fft!(w)
    q = plan_ifft!(w)

    for n in 1:nsteps
        w = p*w
        w = q*w
    end
    w
end

srand(1)
u = rand(2^16)
ch(5, u)
@time ch(100, u)
</code></pre></div>
<p dir="auto">Julia 0.4.6:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="_% /usr/bin/julia slowdown2.jl
  0.299310 seconds (246 allocations: 1.015 MB)"><pre class="notranslate"><code class="notranslate">_% /usr/bin/julia slowdown2.jl
  0.299310 seconds (246 allocations: 1.015 MB)
</code></pre></div>
<p dir="auto">Julia 0.5 RC3:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="_% /usr/local/julia/bin/julia slowdown2.jl 
  3.104827 seconds (271 allocations: 1.015 MB)"><pre class="notranslate"><code class="notranslate">_% /usr/local/julia/bin/julia slowdown2.jl 
  3.104827 seconds (271 allocations: 1.015 MB)
</code></pre></div>
<p dir="auto">Here is the versioninfo:</p>
<p dir="auto">Julia 0.4.6:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="_% /usr/bin/julia -e 'versioninfo()'
Julia Version 0.4.6
Commit 2e358ce* (2016-06-19 17:16 UTC)
Platform Info:
  System: Linux (x86_64-redhat-linux)
  CPU: Intel(R) Xeon(R) CPU           X5650  @ 2.67GHz
  WORD_SIZE: 64
  BLAS: libopenblas (DYNAMIC_ARCH NO_AFFINITY Nehalem)
  LAPACK: libopenblasp.so.0
  LIBM: libopenlibm
  LLVM: libLLVM-3.3"><pre class="notranslate"><code class="notranslate">_% /usr/bin/julia -e 'versioninfo()'
Julia Version 0.4.6
Commit 2e358ce* (2016-06-19 17:16 UTC)
Platform Info:
  System: Linux (x86_64-redhat-linux)
  CPU: Intel(R) Xeon(R) CPU           X5650  @ 2.67GHz
  WORD_SIZE: 64
  BLAS: libopenblas (DYNAMIC_ARCH NO_AFFINITY Nehalem)
  LAPACK: libopenblasp.so.0
  LIBM: libopenlibm
  LLVM: libLLVM-3.3
</code></pre></div>
<p dir="auto">Julia 0.5 RC3:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="_% /usr/local/julia/bin/julia -e 'versioninfo()'
Julia Version 0.5.0-rc3+0
Commit e6f843b (2016-08-22 23:43 UTC)
Platform Info:
  System: Linux (x86_64-unknown-linux-gnu)
  CPU: Intel(R) Xeon(R) CPU           X5650  @ 2.67GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Nehalem)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.7.1 (ORCJIT, westmere)"><pre class="notranslate"><code class="notranslate">_% /usr/local/julia/bin/julia -e 'versioninfo()'
Julia Version 0.5.0-rc3+0
Commit e6f843b (2016-08-22 23:43 UTC)
Platform Info:
  System: Linux (x86_64-unknown-linux-gnu)
  CPU: Intel(R) Xeon(R) CPU           X5650  @ 2.67GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Nehalem)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.7.1 (ORCJIT, westmere)
</code></pre></div>