On Wednesday, June 11, 2014 12:51:08 AM Mike Innes wrote:
> You should be able to use
>
> @profile include("script.jl")
Although that will also include compilation time. A better approach is for
"script.jl" to define a function (say, "runme()"), run it once to force
compilation, and then say
@profile runme()
As far as running it from a shebang script, everything you need should be
described in this section:
http://docs.julialang.org/en/latest/stdlib/profile/#options-for-controlling-the-display-of-profile-results
--Tim
>
> On Wednesday, 11 June 2014 08:39:53 UTC+1, Rich Morin wrote:
> > On Tuesday, June 10, 2014 10:19:44 PM UTC-7, Stefan Karpinski wrote:
> >> More recent version may be more complete:
> >>
> >> http://julia.readthedocs.org/en/latest/manual/performance-tips/
> >>
> >> We've not yet spent a lot of time optimizing strings and I/O but we still
> >> tend to be around the same as Python, which tends to be much faster than
> >> Ruby but slower than Perl. So if your code is much slower in Julia than
> >> in
> >> Ruby, something is almost certainly amiss.
> >
> > I cleaned up some globals (turning some into consts; annotating others),
> > with no significant improvement. I'd like to try using the sampling
> > profiler, but it seems to be tied to the REPL. Is there a way to use it on
> > a shebang script? If not, I'll simply fudge the code for running in the
> > REPL.
> >
> > -r