<p dir="auto">I was testing a few different ways to calculate a quantity over an array, and noticed for loops slowed down significantly from commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/JuliaLang/julia/commit/317a4d1141fa5302f98f0079b98e679d4847c7eb/hovercard" href="https://github.com/JuliaLang/julia/commit/317a4d1141fa5302f98f0079b98e679d4847c7eb"><tt>317a4d1</tt></a>* (16 days old master). <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/timholy/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/timholy">@timholy</a> suggested I file an issue here.<br>
The test code is here: <a href="https://github.com/JaredCrean2/julia_tests/tree/master/array_speed2">https://github.com/JaredCrean2/julia_tests/tree/master/array_speed2</a>.  It does the calculating using a manually inlined double for loop, ArrayViews, and SubArrays.</p>
<p dir="auto">Using Julia Version 0.4.0-dev+5149 (2015-06-01 18:58 UTC) Commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/JuliaLang/julia/commit/317a4d1141fa5302f98f0079b98e679d4847c7eb/hovercard" href="https://github.com/JuliaLang/julia/commit/317a4d1141fa5302f98f0079b98e679d4847c7eb"><tt>317a4d1</tt></a>* (16 days old master)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" 592.426 milliseconds (14232 allocations: 586 KB)
double loop @time printed above
 495.138 milliseconds (14422 allocations: 599 KB)
ArrayView @time printed above
  15.753 seconds      (300 M allocations: 8240 MB, 3.39% gc time)
slice @time printed above"><pre class="notranslate"><code class="notranslate"> 592.426 milliseconds (14232 allocations: 586 KB)
double loop @time printed above
 495.138 milliseconds (14422 allocations: 599 KB)
ArrayView @time printed above
  15.753 seconds      (300 M allocations: 8240 MB, 3.39% gc time)
slice @time printed above
</code></pre></div>
<p dir="auto">Using Julia Version 0.4.0-dev+5439 (2015-06-18 13:48 UTC) Commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/JuliaLang/julia/commit/a23caa06c923d1efe174e4bdcf17115c1904d430/hovercard" href="https://github.com/JuliaLang/julia/commit/a23caa06c923d1efe174e4bdcf17115c1904d430"><tt>a23caa0</tt></a>* (0 days old master):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="   1.720 seconds      (102 k allocations: 3600 KB)
double loop @time printed above
 566.122 milliseconds (16237 allocations: 692 KB)
ArrayView @time printed above
   4.137 seconds      (240 M allocations: 8240 MB, 12.96% gc time)
slice @time printed above"><pre class="notranslate"><code class="notranslate">   1.720 seconds      (102 k allocations: 3600 KB)
double loop @time printed above
 566.122 milliseconds (16237 allocations: 692 KB)
ArrayView @time printed above
   4.137 seconds      (240 M allocations: 8240 MB, 12.96% gc time)
slice @time printed above
</code></pre></div>
<p dir="auto">I looked at <code class="notranslate">@code_warntye getEulerFlux(q,F)</code>, and the <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/JuliaLang/julia/commit/a23caa06c923d1efe174e4bdcf17115c1904d430/hovercard" href="https://github.com/JuliaLang/julia/commit/a23caa06c923d1efe174e4bdcf17115c1904d430"><tt>a23caa0</tt></a> produced a huge amount of code (&gt;1100 lines) compared to the <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/JuliaLang/julia/commit/317a4d1141fa5302f98f0079b98e679d4847c7eb/hovercard" href="https://github.com/JuliaLang/julia/commit/317a4d1141fa5302f98f0079b98e679d4847c7eb"><tt>317a4d1</tt></a> (~70 lines), and included many lines that looked like</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="(top(throw_boundserror))(q::Array{Float64,3},GenSym(45))::Union{}"><pre class="notranslate">(<span class="pl-c1">top</span>(throw_boundserror))(q<span class="pl-k">::</span><span class="pl-c1">Array{Float64,3}</span>,<span class="pl-c1">GenSym</span>(<span class="pl-c1">45</span>))<span class="pl-k">::</span><span class="pl-c1">Union{}</span></pre></div>
<p dir="auto">that were not present in <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/JuliaLang/julia/commit/317a4d1141fa5302f98f0079b98e679d4847c7eb/hovercard" href="https://github.com/JuliaLang/julia/commit/317a4d1141fa5302f98f0079b98e679d4847c7eb"><tt>317a4d1</tt></a>.</p>
<p dir="auto">It would be great to get suggestions from the REPL on methods for a given type. For example, I enter a <code class="notranslate">DataFrame</code> <code class="notranslate">df</code> on the REPL, and it provides me with a list of methods that I can use with a <code class="notranslate">DataFrame</code>. Amongst others, this would suggest <code class="notranslate">head</code> for the <code class="notranslate">DataFrame</code>. I could then select and autocomplete with <code class="notranslate">[TAB]</code> in the same way as currenly be done with autocompletion of fields etc. Finally, the REPL prepends the selection to create the resulting method call, e.g. <code class="notranslate">head(df)</code>. This can be based on <code class="notranslate">methodswith</code>.</p>
<p dir="auto">With this feature, we replicate the benefit that the Python user enjoys when she types <code class="notranslate">df.[TAB]</code> to get a list of names (including functions) associated with an object.</p>
<p dir="auto">One way to evoke this list may be to type <code class="notranslate">(df)[TAB]</code> to get the list list of <code class="notranslate">methodswith(typeof(df))</code>, but any better suggestion from a REPL expert is welcome.</p>
<p dir="auto">An alphabetically ordered list would be a good start. As a refinement, the list can have clever prioritization/filtering, e.g.  prioritize methods where the type is the only argument, the first argument, methods that are unique to this type (as opposed to e.g. <code class="notranslate">+</code> which is defined for many types), ... .</p>