With Jameson's work on static compilation and very early work towards interpreting Julia code, this will get addressed, but not in the near future.
-viral On Tuesday, January 20, 2015 at 12:11:45 AM UTC+5:30, Gray Calhoun wrote: > > Hi Christian, you can certainly make the code-writing process > much faster by splitting large functions into many distinct > smaller functions. In your example (which I've only skimmed), > `mimosimu` looks like it directly implements and annotates > several similar but different algorithms which could all be > separate functions. Compilation happens at the function level, > not the file level, and shorter functions compile (and usually > run) much faster. > > Also, loading part of a file is something that editors can handle > as well, so if there aren't satisfactory packages (I haven't > tried the Autoreload.jl package recommended in the last thread, > but it looks promising), using an editor like Emacs (with ESS) or > Light Table (with Juno) could help. I'm sure there are lots of > other editors that do this too, but those are the two I'm > familiar with. > > On Sunday, January 18, 2015 at 10:04:58 PM UTC-6, Christian Peel wrote: >> >> I'm enjoying learning Julia. >> >> I have the same toy script written in Matlab and Julia at the following >> URL: >> https://github.com/ChristianPeel/toySims/tree/master/mimoToys >> Running the following in matlab >> tic; mimoUPtoy(200,4,4,4,0,12,12,[-10:5:30]); toc >> takes about 0.82 seconds on a specific machine. In contrast, with Julia >> I first need to 'include' it, then the first time through the compiler >> takes around 7 seconds to compile the code and execute it. Subsequent >> executions of the code have speed similar to Matlab. >> julia> tic(); include("mimoUPtoy.jl"); toc() >> elapsed time: 0.348886314 seconds >> 0.348886314 >> julia> tic(); mimoUPtoy(200,4,4,4,0,12,12,[-10.0:5:30]); toq() >> ...output... >> 7.002885787 >> julia> tic(); mimoUPtoy(200,4,4,4,0,12,12,[-10.0:5:30]); toq() >> ...output... >> 0.860070365 >> Some questions are (1) is there is some improvement in 0.4 or otherwise >> which would improve the initial JIT time? (2) is there any way to only >> recompile the parts of a file that have changed? Say by using a hash on a >> function to see if it has changed? (3) I'm used to the Matlab development >> cycle in which I don't need to 'include' anything (it's done automatically) >> and also any JIT compilation that Matlab does is very fast and is >> essentially not noticable. So even though Matlab may be slower for code >> execution, it feels faster for code development. Is there anything that >> can be done to Julia to make the code writing process quicker? Is there a >> way to automate the 'include' process? >> >> I acknowledge that one option to speed compilation time is to break >> mimoUPtoy.jl into separate files. I'm also sure that there are things that >> can be improved in both my Matlab and Julia code. Finally; this function >> is similar to that which I refered to in a previous post (I was busy at the >> time and didn't get the code posted) >> >> https://groups.google.com/forum/?fromgroups=#!searchin/julia-users/peel/julia-users/thR_80jtE2Q/ymV5i-AXmKkJ >> >>