Julia file input reading speed <p>I'm giving Julia a go while solving Code Jam problems, in this case Rope Intranet from round 1C 2010 (<a href="https://code.google.com/codejam/contest/619102/dashboard" rel="nofollow">https://code.google.com/codejam/contest/619102/dashboard</a>)</p> <p>Solution is basically: </p> <pre><code>for tc = 1:int(readline()) n = int(readline()) a = [map(int, split(readline())) for _ = 1:n] ans = 0 for (i, x) in enumerate(a) for y in a[i + 1:end] ans += (x[1] - y[1]) * (x[2] - y[2]) &lt; 0 end end println("Case #", tc, ": ", ans) end </code></pre> <p>However, time results for the large input are not very impressive comparing to solutions in c++ and python:</p> <pre><code>julia real 0m6.196s user 0m6.028s sys 0m0.373s c++ real 0m0.392s user 0m0.338s sys 0m0.053s pypy real 0m0.529s user 0m0.507s sys 0m0.016s </code></pre> <p>Situation changes, when I replace file input with random numbers (still slower than c++ though):</p> <pre><code>julia real 0m3.065s user 0m2.868s sys 0m0.338s c++ real 0m1.413s user 0m1.348s sys 0m0.055s pypy real 0m22.491s user 0m22.257s sys 0m0.160s </code></pre> <p>Is there any way I can optimize file reading times in Julia (I'm using v0.3.7)?</p>